DIRECTORY LoganBerry USING [Describe, SchemaInfo], LoganBerryExtras; LoganBerryExtrasImpl: CEDAR PROGRAM IMPORTS LoganBerry EXPORTS LoganBerryExtras ~ BEGIN OPEN LoganBerryExtras; Describe2: PUBLIC PROC [conv: Conv _ NIL, db: OpenDB] RETURNS [info: SchemaInfo] ~ { oldinfo: LoganBerry.SchemaInfo _ LoganBerry.Describe[conv, db]; info _ NEW[SchemaInfoRec]; info.dbName _ oldinfo.dbName; WHILE oldinfo.logs#NIL DO log: LogInfo _ NEW[LogInfoRec _ [id: oldinfo.logs.first, file: oldinfo.logNames.first]]; info.logs _ CONS[log, info.logs]; oldinfo.logs _ oldinfo.logs.rest; oldinfo.logNames _ oldinfo.logNames.rest; ENDLOOP; info.logs _ ReverseLogList[info.logs]; WHILE oldinfo.keys#NIL DO index: IndexInfo _ NEW[IndexInfoRec _ [key: oldinfo.keys.first, file: oldinfo.indexNames.first]]; info.indices _ CONS[index, info.indices]; oldinfo.keys _ oldinfo.keys.rest; oldinfo.indexNames _ oldinfo.indexNames.rest; ENDLOOP; info.indices _ ReverseIndexList[info.indices]; }; ReverseLogList: PROC [list: LIST OF LogInfo] RETURNS [LIST OF LogInfo] ~ { new, temp: LIST OF LogInfo _ NIL; UNTIL list = NIL DO temp _ list; list _ list.rest; temp.rest _ new; new _ temp; ENDLOOP; RETURN[new]; }; ReverseIndexList: PROC [list: LIST OF IndexInfo] RETURNS [LIST OF IndexInfo] ~ { new, temp: LIST OF IndexInfo _ NIL; UNTIL list = NIL DO temp _ list; list _ list.rest; temp.rest _ new; new _ temp; ENDLOOP; RETURN[new]; }; END. PLoganBerryExtrasImpl.mesa Copyright c 1986 by Xerox Corporation. All rights reserved. Doug Terry, January 28, 1987 3:44:12 pm PST This should really be part of LoganBerryImpl.mesa. It'll get folded in at a convenient time, perhaps in the conversion to Cedar 7.0. Returns schema information about the database. Doug Terry, January 28, 1987 10:50:31 am PST changes to: DIRECTORY, IMPORTS Doug Terry, January 28, 1987 2:21:21 pm PST changes to: DIRECTORY, IMPORTS Doug Terry, January 28, 1987 3:44:12 pm PST changes to: Describe2, ReverseLogList, DIRECTORY, IMPORTS, ReverseLogList Κ{˜codešœ™Kšœ Οmœ1™