Message-Id: <199612300146.CAA20822@math.amu.edu.pl> Comments: Authenticated sender is From: "Mark Habersack" Organization: Home, sweet home (Poznan, Poland) To: murray AT southeast DOT net (Murray Stokely), djgpp AT delorie DOT com Date: Mon, 30 Dec 1996 02:45:51 +0100 MIME-Version: 1.0 Content-type: Multipart/Mixed; boundary=Message-Boundary-19791 Subject: Re: Detecting Operating System Reply-to: grendel AT ananke DOT amu DOT edu DOT pl --Message-Boundary-19791 Content-type: text/plain; charset=US-ASCII Content-description: Information about this message. This message contains a file prepared for transmission using the MIME BASE64 transfer encoding scheme. If you are using Pegasus Mail or another MIME-compliant system, you should be able to extract it from within your mailer. If you cannot, please ask your system administrator for help. ---- File information ----------- File: isemu.c Date: 4 Nov 1995, 17:54 Size: 1712 bytes. Type: Unix-text --Message-Boundary-19791 Content-type: Application/Octet-stream; name=isemu.c; type=Unix-text Content-transfer-encoding: BASE64 LyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAqIElz ZW11LmMKICogV3JpdHRlbjogMDMvMTQvOTUgYnkgS2FuZy1KaW4gTGVlCiAqICAtIERldGVj dHMgYW5kIHNob3dzIERvc2VtdSBtYWpvciB2ZXJzaW9uIG51bWJlcgogKgogKiBNb2RpZmll ZCAwNC8wMy85NQogKiAgLSBXb3JrcyBvbmx5IHdpdGggRG9zZW11IDAuNTMuNTgrCiAqICAt IERldGVjdHMgYW5kIHNob3dzIERvc2VtdSB2ZXJzaW9uLCBzdWJ2ZXJzaW9uCiAqICAgIGFu ZCBwYXRjaGxldmVsCiAqICAtIFJldHVybnMgZXJyb3JsZXZlbCA9IFZFUlNJT04gKiAxMDAg KyBTVUJMRVZFTAogKiAgICBEb3NlbXUtMS4yLjQgcmV0dXJucyBlcnJvcmxldmVsIDEwMgog KgogKiBNb2RpZmllZCAxMC8zMC85NQogKiAgLSBDaGVja3MgQklPUyByZWxlYXNlIGRhdGUg YmVmb3JlIGNoZWNraW5nIGZvcgogKiAgICBEb3NlbXUKICoqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqLwoKCiNpbmNsdWRlIDxkb3MuaD4gICAgLyog Z2VuaW50ZXJydXB0ICovCiNpbmNsdWRlIDxzdGRpby5oPiAgLyogcHJpbnRmICAgICAgICov CiNpbmNsdWRlIDxzdHJpbmcuaD4KCgojZGVmaW5lIERPU19IRUxQRVJfSU5UICAgICAgICAg ICAweEU2CiNkZWZpbmUgRE9TX0hFTFBFUl9ET1NFTVVfQ0hFQ0sgIDB4MDAKI2RlZmluZSBE T1NFTVVfQklPU19EQVRFICAgICAgICAgIjAyLzI1LzkzIgoKCmludCBjaGVja19kYXRlKHZv aWQpCnsKICAgIGludCBpOwogICAgdW5zaWduZWQgY2hhciBmYXIgKnBvczsKICAgIHVuc2ln bmVkIGNoYXIgYl9kYXRlWzhdOwoKICAgIHBvcyA9IE1LX0ZQKDB4RjAwMCwgMHhGRkY1KTsK CiAgICBmb3IgKGkgPSAwOyBpIDwgODsgaSsrKQogICAgICAgICBiX2RhdGVbaV0gPSBwb3Nb aV07CgogICAgaWYgKHN0cm5jbXAoYl9kYXRlLCBET1NFTVVfQklPU19EQVRFLCA4KSA9PSAw KQogICAgICAgICByZXR1cm4gKDEpOwogICAgZWxzZQogICAgICAgICByZXR1cm4gKDApOwp9 CgovKiByZXR1cm5zIG5vbi16ZXJvIHZlcnNpb24gbnVtYmVyIGlmIERPU0VNVSBpcyBsb2Fk ZWQgKi8KaW50IG1haW4odm9pZCkKewogICAgdW5zaWduZWQgaW50IHZlcnNpb24sIHN1Ymxl dmVsLCBwYXRjaGxldmVsOwoKICAgIGlmIChjaGVja19kYXRlKCkgPT0gMCkKICAgIHsKICAg ICAgICAgcHJpbnRmKCJEb3NlbXUgQklPUyBzaWduYXR1cmUgbm90IGRldGVjdGVkXG4iKTsK ICAgICAgICAgcmV0dXJuICgwKTsKICAgIH0KCiAgICBfQUwgPSBET1NfSEVMUEVSX0RPU0VN VV9DSEVDSzsKICAgIGdlbmludGVycnVwdChET1NfSEVMUEVSX0lOVCk7CgogICAgLyogY2hl Y2sgZm9yIHNpZ25hdHVyZSBpbiBBWCAqLwogICAgaWYgKF9BWCA9PSAweGFhNTUpCiAgICB7 CiAgICAgICAgIHZlcnNpb24gPSBfQlggLyAweDEwMDsKICAgICAgICAgc3VibGV2ZWwgPSBf QlggJSAweDEwMDsKICAgICAgICAgcGF0Y2hsZXZlbCA9IF9DWDsKICAgICAgICAgcHJpbnRm KCJEZXRlY3RlZDogRG9zZW11ICVkLiVkLiVkXG4iLCB2ZXJzaW9uLCBzdWJsZXZlbCwgcGF0 Y2hsZXZlbCk7CiAgICAgICAgIHJldHVybiAodmVyc2lvbiAqIDEwMCArIHN1YmxldmVsKTsK ICAgIH0KICAgIGVsc2UKICAgIHsKICAgICAgICAgcHJpbnRmKCJEb3NlbXUgbm90IGRldGVj dGVkXG4iKTsKICAgICAgICAgcmV0dXJuICgwKTsKICAgIH0KfQo= --Message-Boundary-19791--