mirror of
https://github.com/vishapoberon/compiler.git
synced 2026-04-06 07:32:24 +00:00
Consolidate ooc2 library files.
This commit is contained in:
parent
6a1b2f4967
commit
9021308e47
5 changed files with 0 additions and 136 deletions
34
src/lib/ooc2/oocwrapperlibc.Mod
Normal file
34
src/lib/ooc2/oocwrapperlibc.Mod
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
MODULE oocwrapperlibc;
|
||||
IMPORT SYSTEM;
|
||||
PROCEDURE -includeStdio()
|
||||
"#include <stdio.h>";
|
||||
|
||||
PROCEDURE -sys(str: ARRAY OF CHAR): INTEGER
|
||||
"system(str)";
|
||||
|
||||
PROCEDURE system*(cmd : ARRAY OF CHAR);
|
||||
VAR r : INTEGER;
|
||||
BEGIN
|
||||
r := sys(cmd);
|
||||
END system;
|
||||
(*
|
||||
PROCEDURE strtod* (string: C.address;
|
||||
VAR tailptr: C.charPtr1d): C.double;
|
||||
PROCEDURE strtof* (string: C.address;
|
||||
VAR tailptr: C.charPtr1d): C.float;
|
||||
PROCEDURE sscanf* (s: C.address; template: ARRAY OF CHAR; ...) : C.int;
|
||||
*)
|
||||
|
||||
PROCEDURE -sprntf(s, t0, t1, t2: ARRAY OF CHAR): INTEGER
|
||||
"sprintf(s, t0, t1, t2)";
|
||||
|
||||
PROCEDURE sprintf* (VAR s: ARRAY OF CHAR; template0: ARRAY OF CHAR; template1: ARRAY OF CHAR; template2: ARRAY OF CHAR);
|
||||
VAR r : INTEGER;
|
||||
BEGIN
|
||||
r := sprntf (s, template0, template1, template2);
|
||||
END sprintf;
|
||||
|
||||
BEGIN
|
||||
|
||||
|
||||
END oocwrapperlibc.
|
||||
Loading…
Add table
Add a link
Reference in a new issue