(* GEOS.PAS -- global GEOS stuff ** Copyright (c) 1995,1996 Jochen Metzinger ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 2, or (at your option) ** any later version. ** ** This program is distributed in the hope that it will be useful, ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** GNU General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with this program; if not, write to the Free Software ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) UNIT geos; INTERFACE TYPE DirRec = RECORD dostype: BYTE; (* DOS file type *) tr_1st, sc_1st: BYTE; (* Track/Sector number of first sector *) name: ARRAY [1..16] OF CHAR; (* File name *) tr_info, sc_info: BYTE; (* Track/Sector number for info sector *) struct: BYTE; (* File structure *) geostype: BYTE; (* GEOS file type *) year, month, day, hour, minute: BYTE; (* time and date of the file's creation *) size: WORD; (* File size in blocks *) END; (* DirRec *) InfoRec = RECORD CASE INTEGER OF 0: (b: ARRAY [2..255] OF BYTE); 1: (w: ARRAY [1..127] OF WORD); 2: (icon_8x, icon_y: BYTE; HiResMode: BYTE; icon: ARRAY [0..62] OF BYTE; ftyp: BYTE; gtyp: BYTE; strk: BYTE; prg_start: WORD; prg_end: WORD; sys_addr: WORD; class: ARRAY [1..20] OF CHAR; disk: ARRAY [1..20] OF CHAR; appl: ARRAY [1..20] OF CHAR; intern: ARRAY [1..23] OF BYTE; text: ARRAY [1..96] OF CHAR); END; (* InfoRec *) FUNCTION TermString(s: STRING; c: CHAR): STRING; (* return S without terminating C *) IMPLEMENTATION FUNCTION TermString(s: STRING; c: CHAR): STRING; VAR p: INTEGER; BEGIN p := Pos(c, s); IF p > 0 THEN Delete(s,p,$FF); TermString := s; END; (* TermString *) END. (* geos *)