aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/windows/mcode/ghdlversion.adb
blob: d2f1c28be71ce38d88a1a79086379e50c91f40de (plain)
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
26
27
28
29
30
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Strings.Fixed; use Ada.Strings.Fixed;

procedure Ghdlversion is
   Line : String (1 .. 128);
   Len : Natural;
   Pos : Natural;
   E : Natural;
begin
   loop
      exit when End_Of_File;
      Get_Line (Line, Len);
      
      --  Search GHDL
      Pos := Index (Line (1 .. Len), "GHDL ");
      if Pos /= 0 then
	 Pos := Pos + 5;
	 E := Pos;
	 while Line (E) in '0' .. '9'
	   or Line (E) in 'a' .. 'z'
	   or Line (E) = '.'
	 loop
	    exit when E = Len;
	    E := E + 1;
	 end loop;
	 Put_Line ("!define VERSION """ & Line (Pos .. E - 1) & """");
	 return;
      end if;
   end loop;
end Ghdlversion;
/span> null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows Form Designer generated code /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); this.serSerialPort = new System.IO.Ports.SerialPort(this.components); this.cmbComPort = new System.Windows.Forms.ComboBox(); this.lblComPort = new System.Windows.Forms.Label(); this.btnMinimize = new System.Windows.Forms.Button(); this.btnExit = new System.Windows.Forms.Button(); this.nicoNotifyIcon = new System.Windows.Forms.NotifyIcon(this.components); this.SuspendLayout(); // // cmbComPort // this.cmbComPort.FormattingEnabled = true; this.cmbComPort.Location = new System.Drawing.Point(108, 12); this.cmbComPort.Name = "cmbComPort"; this.cmbComPort.Size = new System.Drawing.Size(126, 21); this.cmbComPort.TabIndex = 0; this.cmbComPort.SelectedIndexChanged += new System.EventHandler(this.cmbComPort_SelectedIndexChanged); // // lblComPort // this.lblComPort.AutoSize = true; this.lblComPort.Location = new System.Drawing.Point(12, 15); this.lblComPort.Name = "lblComPort"; this.lblComPort.Size = new System.Drawing.Size(90, 13); this.lblComPort.TabIndex = 1; this.lblComPort.Text = "COM Port to Use:"; // // btnMinimize // this.btnMinimize.Location = new System.Drawing.Point(12, 42); this.btnMinimize.Name = "btnMinimize"; this.btnMinimize.Size = new System.Drawing.Size(109, 23); this.btnMinimize.TabIndex = 2; this.btnMinimize.Text = "Minimize to Tray"; this.btnMinimize.UseVisualStyleBackColor = true; this.btnMinimize.Click += new System.EventHandler(this.btnMinimize_Click); // // btnExit // this.btnExit.Location = new System.Drawing.Point(131, 42); this.btnExit.Name = "btnExit"; this.btnExit.Size = new System.Drawing.Size(109, 23); this.btnExit.TabIndex = 3; this.btnExit.Text = "Exit"; this.btnExit.UseVisualStyleBackColor = true; this.btnExit.Click += new System.EventHandler(this.btnExit_Click); // // nicoNotifyIcon // this.nicoNotifyIcon.Text = "Mail Notifier"; this.nicoNotifyIcon.Visible = true; // // MailNotifier // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(252, 77); this.Controls.Add(this.btnExit); this.Controls.Add(this.btnMinimize); this.Controls.Add(this.lblComPort); this.Controls.Add(this.cmbComPort); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; this.MaximizeBox = false; this.Name = "MailNotifier"; this.Text = "Mail Notifier Light"; this.WindowState = System.Windows.Forms.FormWindowState.Minimized; this.Load += new System.EventHandler(this.MailNotifier_Load); this.ResumeLayout(false); this.PerformLayout(); } #endregion private System.IO.Ports.SerialPort serSerialPort; private System.Windows.Forms.ComboBox cmbComPort; private System.Windows.Forms.Label lblComPort; private System.Windows.Forms.Button btnMinimize; private System.Windows.Forms.Button btnExit; private System.Windows.Forms.NotifyIcon nicoNotifyIcon; } }