/****************************************/ /* */ /* Author: */ /* */ /* Ira Winston */ /* Computer Science Department */ /* University of Pennsylvania */ /* */ /****************************************/ Filestat: Procedure (Filename) Returns (Fixed Binary); /* Filestat determines the type of carriage control a file has. */ /* */ /* 1 is returned if the file has implied carriage control */ /* 2 is returned if the file has imbedded carriage control */ /* 3 is returned if the file does not exist */ Declare Filename Character(*); Declare Testfile Record Input Environment(Shared_Read); %Include Pli_File_Display; Declare Fileptr Pointer; On UndefinedFile(Testfile) Go to Nsf; Open File(Testfile) Title(Filename); Allocate Pli_File_Display Set (Fileptr); Call Display(Testfile, Fileptr->Pli_File_Display); Close File(Testfile); If Fileptr->Carriage_Return_Format Then Return(1); Else Return(2); Nsf: Return(3); End Filestat;