Diff
Not logged in

Differences From Artifact [487b856e16418ffe]:

To Artifact [d9955daaabe58d54]:


1 1 import std.algorithm; 2 2 import std.array; 3 3 import std.conv; 4 4 import std.stdio; 5 5 import std.string; 6 6 import std.typecons; 7 +import core.stdc.signal; 8 +import core.stdc.stdlib; 7 9 import dfl.all; 8 10 9 11 class Map 10 12 { 11 13 private char[][] data; 12 14 bool dead = false; 13 15 bool cleared = false; ................................................................................ 371 373 writeln("Score: ", score); 372 374 Application.exit(); 373 375 } 374 376 this.text = .text("Score: ", score, " air[",m.water_proof-m.underwater,"]"); 375 377 invalidate(); 376 378 } 377 379 } 380 + 381 +extern(C) { 382 + void sigint(int) { 383 + write("A"); 384 + stdout.flush(); 385 + exit(0); 386 + } 387 +} 378 388 379 389 void main(string[] args) 380 390 { 391 + signal(SIGINT, &sigint); 392 + 381 393 Form myForm = new MyForm(new Map(File(args[1]))); 382 394 Application.run(myForm); 383 395 }