home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / pasos2b.zip / lib / paslib.pas < prev    next >
Pascal/Delphi Source File  |  1993-11-03  |  2KB  |  93 lines

  1. (*
  2.  * FileName:   paslib.pas
  3.  * $Source: E:/usr/src/c-code/pascal/RCS/LIB/paslib.pas,v $
  4.  * $Author: wjw $
  5.  * $Date: 1993/11/03 15:54:56 $
  6.  * $Locker: wjw $
  7.  * $State: Exp $
  8.  * $Revision: 1.1 $
  9.  * Description:
  10. D*      Part of the runtime library which comes with PASCAL for OS/2
  11. D*      
  12.  *
  13.  * History:
  14.  *      First created by Willem Jan Withagen ( wjw@eb.ele.tue.nl ),
  15.  *                    on Mon July 26 23:30:03 MET 1993
  16.  * Copyright:
  17.  *      Copyright (c) 1993 by Willem Jan Withagen and 
  18.  *                      Digital Information Systems group, TUE
  19.  *      For copying and distribution information see the file COPYRIGHT.
  20.  *
  21.  *)
  22.  
  23. program paslib;
  24. #include <os2.inc>
  25.  
  26. procedure $IOInit; external;
  27. procedure $IOExit; external;
  28. procedure $HeapInit; external;
  29. procedure $HeapExit; external;
  30. procedure $SetInit; external;
  31. procedure $SetExit; external;
  32. procedure $StdInit; forward;
  33. procedure $StdExit; forward;
  34.  
  35. (* Standard routines *)
  36.  
  37. function $Stdodd(i: integer):boolean;
  38. begin
  39.     $Stdodd := ((abs(i) mod 2) = 1)
  40. end;
  41.  
  42. function $Stdintabs(i, size: integer):integer;
  43. (*  Take the absolute value of i, where 'i' has 'size' significant bytes.
  44. (*  Assume that the value is correctly expanded to become a parameter
  45.  *)
  46. begin
  47.      if i < 0 then $Stdintabs := -i
  48.               else $Stdintabs := i
  49. end;
  50.  
  51. procedure $StdHalt(exitval :_word);
  52. (*  Cleanly terminate.
  53.  *)
  54. var
  55.     _rc: _word;
  56. begin
  57.      $StdExit
  58.     ;_rc := Dos32Exit(1,exitval)
  59. end;
  60.  
  61. procedure $StdAbort(exitval :_word);
  62. var
  63.     _rc: _word;
  64. begin
  65.     _rc := Dos32Exit(1,exitval)
  66. end;
  67.  
  68. procedure $StdInit;
  69. begin
  70.      $IOInit
  71.     ;$HeapInit
  72.     ;$SetInit
  73. end;
  74.  
  75. procedure $StdExit;
  76. begin
  77.      $SetExit
  78.     ;$HeapExit
  79.     ;$IOExit
  80. end;
  81.  
  82. begin
  83. end.
  84. (*
  85.  * $Log: paslib.pas,v $
  86.  * Revision 1.1  1993/11/03  15:54:56  wjw
  87.  * Started adminstration for the RUNTIME LIB
  88.  *
  89.  *
  90.  *      First created by Willem Jan Withagen ( wjw@eb.ele.tue.nl ),
  91.  *                    on Mon July 26 23:30:03 MET 1993
  92.  *)
  93.