Re: [BLACKBOX] Converters

From: [at]} <igor_d{>
Date: Wed, 17 Sep 2008 12:04:41 +0300

----boundary-LibPST-iamunique-970412686_-_-
Content-type: text/plain

R> It there a way of finding a file's pathName?
Yes. But the way is horrible. See procedure HostBitmaps.ImportBitmap.

PROCEDURE ImportBitmap* (f: Files.File; OUT s: Stores.Store);
 TYPE Str = POINTER TO ARRAY [untagged] OF CHAR;
 VAR name: Str;
BEGIN
  name := SYSTEM.VAL(Str, SYSTEM.VAL(INTEGER, f) + 40);

The magic number 40 is the offset of the field 'name' in a record of
type HostFiles.File.

R> Any suggestions?
I prefer to customise module HostFiles by adding a simple procedure.
PROCEDURE GetFileName*(f: Files.File; VAR name: ARRAY OF CHAR);


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-970412686_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwIFI+IEl0IHRoZXJlIGEgd2F5IG9mIGZpbmRpbmcg
YSBmaWxlJ3MgcGF0aE5hbWU/XHBhcg0KWWVzLiBCdXQgdGhlIHdheSBpcyBob3JyaWJsZS4gU2Vl
IHByb2NlZHVyZSBIb3N0Qml0bWFwcy5JbXBvcnRCaXRtYXAuXHBhcg0KXHBhcg0KUFJPQ0VEVVJF
IEltcG9ydEJpdG1hcCogKGY6IEZpbGVzLkZpbGU7IE9VVCBzOiBTdG9yZXMuU3RvcmUpO1xwYXIN
CiBUWVBFIFN0ciA9IFBPSU5URVIgVE8gQVJSQVkgW3VudGFnZ2VkXSBPRiBDSEFSO1xwYXINCiBW
QVIgbmFtZTogU3RyO1xwYXINCkJFR0lOXHBhcg0KICBuYW1lIDo9IFNZU1RFTS5WQUwoU3RyLCBT
WVNURU0uVkFMKElOVEVHRVIsIGYpICsgNDApO1xwYXINClxwYXINClRoZSBtYWdpYyBudW1iZXIg
NDAgaXMgdGhlIG9mZnNldCBvZiB0aGUgZmllbGQgJ25hbWUnIGluIGEgcmVjb3JkIG9mXHBhcg0K
dHlwZSBIb3N0RmlsZXMuRmlsZS5ccGFyDQpccGFyDQpSPiBBbnkgc3VnZ2VzdGlvbnM/XHBhcg0K
SSBwcmVmZXIgdG8gY3VzdG9taXNlIG1vZHVsZSBIb3N0RmlsZXMgYnkgYWRkaW5nIGEgc2ltcGxl
IHByb2NlZHVyZS5ccGFyDQpQUk9DRURVUkUgR2V0RmlsZU5hbWUqKGY6IEZpbGVzLkZpbGU7IFZB
UiBuYW1lOiBBUlJBWSBPRiBDSEFSKTtccGFyDQpccGFyDQpccGFyDQotLS0tXHBhcg0KVG8gdW5z
dWJzY3JpYmUsIHNlbmQgYSBtZXNzYWdlIHdpdGggYm9keSAiU0lHTk9GRiBCTEFDS0JPWCIgdG8g
TElTVFNFUlZATElTVFMuT0JFUk9OLkNIfX0AUk9OLg==
----boundary-LibPST-iamunique-970412686_-_---
Received on Wed Sep 17 2008 - 11:04:41 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:30:53 UTC