gitweb on Svarog
projekti pod git sistemom za održavanje verzija -- projects under the git version control system
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 64b8300)
raw | patch | inline | side by side (parent: 64b8300)
author | Doni Pracner <quinnuendo@gmail.com> | |
Mon, 17 Feb 2014 18:44:17 +0000 (19:44 +0100) | ||
committer | Doni Pracner <quinnuendo@gmail.com> | |
Mon, 17 Feb 2014 18:53:57 +0000 (19:53 +0100) |
skripta-os2.tex | patch | blob | history |
diff --git a/skripta-os2.tex b/skripta-os2.tex
index d1e683706b40fe22f629734e3b3282f31dcff8a9..f74696f9390bcbf7937a8081425f0fb779cff4c4 100644 (file)
--- a/skripta-os2.tex
+++ b/skripta-os2.tex
na Kubuntu 11.10 i 12.10 64bit.
\begin{codeblock}
-DEFINITION MODULE FOR "C" Lib32;
+DEFINITION MODULE FOR "C" libdir;
+
FROM SYSTEM IMPORT
ADDRESS, BYTE;
- EXPORT UNQUALIFIED opendir, readdir, closedir, stat,
- PDir, DirEnt, PDirEnt, Stat, PStat, PInt;
+
+ EXPORT UNQUALIFIED opendir, readdir, closedir, PDir, DirEnt, PDirEnt;
\end{codeblock}
-\begin{minipage}{0.5\textwidth}
+\begin{minipage}{0.45\textwidth}
\begin{codeblock}
(* types for 32 bit *)
TYPE
PDir = ADDRESS;
DirEnt = RECORD
- ino: INTEGER;
- off: INTEGER;
- reclen: SHORTCARD;
- type: BYTE;
- name: ARRAY [0..255] OF CHAR;
+ ino: INTEGER;
+ off: INTEGER;
+ reclen: SHORTCARD;
+ type: BYTE;
+ name: ARRAY [0..255] OF CHAR;
END;
PDirEnt = POINTER TO DirEnt;
- Stat = RECORD
- dev: LONGINT;
- ino: LONGINT;
- mode: INTEGER;
- nlink: LONGINT;
- uid: INTEGER;
- gid: INTEGER;
- pad1: LONGINT;
- rdev: INTEGER;
- size: INTEGER;
- blksize: INTEGER;
- blocks: INTEGER;
- atime: LONGINT;
- mtime: LONGINT;
- ctime: LONGINT;
- END;
- \end{codeblock}
+ \end{codeblock}
\end{minipage}
\begin{minipage}{0.45\textwidth}
\begin{codeblock}[frame=single,frameround=tttt]
TYPE
PDir = ADDRESS;
DirEnt = RECORD
- ino: LONGINT;
- off: LONGINT;
- reclen: SHORTCARD;
- type: BYTE;
- name: ARRAY [0..255] OF CHAR;
+ ino: LONGINT;
+ off: LONGINT;
+ reclen: SHORTCARD;
+ type: BYTE;
+ name: ARRAY [0..255] OF CHAR;
END;
PDirEnt = POINTER TO DirEnt;
- Stat = RECORD
- dev: LONGINT;
- ino: LONGINT;
- nlink: LONGINT;
- mode: INTEGER;
- uid: INTEGER;
- gid: INTEGER;
- pad1: INTEGER;
- rdev: LONGINT;
- size: LONGINT;
- blksize: LONGINT;
- blocks: LONGINT;
- atime: LONGINT;
- mtime: LONGINT;
- ctime: LONGINT;
- END;
- \end{codeblock}
+\end{codeblock}
\end{minipage}
\begin{codeblock}
- PStat = POINTER TO Stat;
- PInt = POINTER TO INTEGER;
-
PROCEDURE opendir(name: ARRAY OF CHAR): PDir;
PROCEDURE readdir(dirp: PDir): PDirEnt;
PROCEDURE closedir(dirp: PDir): [INTEGER];
- PROCEDURE stat(path: ARRAY OF CHAR; buf: PStat): [INTEGER];
-END Lib32.
+
+END libdir.
\end{codeblock}
\begin{codeblock}
WriteInt;
FROM Args IMPORT
Narg, GetArg;
- FROM Lib32 IMPORT
+ FROM libdir IMPORT
opendir, readdir, closedir, PDir, PDirEnt;
FROM errno IMPORT
geterrno;