mirror of
https://github.com/vishapoberon/vipak.git
synced 2026-04-05 20:42:26 +00:00
Formatting
This commit is contained in:
parent
3aa2bcec3e
commit
e4232275bf
7 changed files with 40 additions and 33 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
./builds
|
||||||
|
|
@ -88,7 +88,7 @@ BEGIN
|
||||||
END Create;
|
END Create;
|
||||||
|
|
||||||
BEGIN
|
BEGIN
|
||||||
NEW(characterStack);
|
(* NEW(characterStack);
|
||||||
characterStack := Create();
|
characterStack := Create();
|
||||||
characterStack.push(characterStack, 'a');
|
characterStack.push(characterStack, 'a');
|
||||||
characterStack.push(characterStack, 'b');
|
characterStack.push(characterStack, 'b');
|
||||||
|
|
@ -117,5 +117,5 @@ BEGIN
|
||||||
Out.Char(characterStack.top(characterStack));
|
Out.Char(characterStack.top(characterStack));
|
||||||
Out.Ln();
|
Out.Ln();
|
||||||
Out.Char(characterStack.pop(characterStack));
|
Out.Char(characterStack.pop(characterStack));
|
||||||
Out.Ln();
|
Out.Ln(); *)
|
||||||
END CharacterStack.
|
END CharacterStack.
|
||||||
BIN
HashMap
BIN
HashMap
Binary file not shown.
|
|
@ -1,5 +1,5 @@
|
||||||
MODULE HashMap;
|
MODULE HashMap;
|
||||||
IMPORT Logger, CharacterStack, Strings;
|
IMPORT Logger, CharacterStack, Strings, Out;
|
||||||
CONST
|
CONST
|
||||||
ArrayMaxNumber = 5000;
|
ArrayMaxNumber = 5000;
|
||||||
TYPE
|
TYPE
|
||||||
|
|
@ -48,8 +48,6 @@ BEGIN
|
||||||
|
|
||||||
REPEAT
|
REPEAT
|
||||||
symbol := text[i];
|
symbol := text[i];
|
||||||
INC(i);
|
|
||||||
|
|
||||||
IF symbol = symbolBracketStart THEN
|
IF symbol = symbolBracketStart THEN
|
||||||
Logger.Log("Starting Parse Json");
|
Logger.Log("Starting Parse Json");
|
||||||
END;
|
END;
|
||||||
|
|
@ -57,8 +55,12 @@ BEGIN
|
||||||
IF symbol = symbolBracketStart THEN
|
IF symbol = symbolBracketStart THEN
|
||||||
Logger.Log("End Parsing Json");
|
Logger.Log("End Parsing Json");
|
||||||
END;
|
END;
|
||||||
|
INC(i);
|
||||||
|
Logger.LogInt(i);
|
||||||
UNTIL text[i] = 0AX;
|
UNTIL text[i] = 0AX;
|
||||||
|
|
||||||
|
Out.String(" test");
|
||||||
|
|
||||||
RETURN jsonRecord;
|
RETURN jsonRecord;
|
||||||
END Create;
|
END Create;
|
||||||
|
|
||||||
|
|
|
||||||
9
build.sh
9
build.sh
|
|
@ -1,9 +0,0 @@
|
||||||
#/bin/bash
|
|
||||||
|
|
||||||
voc -s \
|
|
||||||
./time.Mod \
|
|
||||||
./logger.Mod \
|
|
||||||
./diaspora2hugo/src/lists/Sys.Mod \
|
|
||||||
./diaspora2hugo/src/lists/List.Mod \
|
|
||||||
./CharacterStack.Mod \
|
|
||||||
./HashMapString.Mod -m
|
|
||||||
24
logger.Mod
24
logger.Mod
|
|
@ -1,23 +1,35 @@
|
||||||
MODULE Logger;
|
MODULE Logger;
|
||||||
IMPORT time, Out;
|
IMPORT time, Out;
|
||||||
|
|
||||||
|
PROCEDURE LogInt*(number: LONGINT);
|
||||||
|
VAR
|
||||||
|
i: LONGINT;
|
||||||
|
BEGIN
|
||||||
|
WHILE number>10 DO
|
||||||
|
number := number DIV 10;
|
||||||
|
INC(i);
|
||||||
|
END;
|
||||||
|
|
||||||
|
Out.Int(number, i);
|
||||||
|
END LogInt;
|
||||||
|
|
||||||
PROCEDURE Log*(buff: ARRAY OF CHAR);
|
PROCEDURE Log*(buff: ARRAY OF CHAR);
|
||||||
VAR
|
VAR
|
||||||
year, month, day, hour, min, sec: LONGINT;
|
year, month, day, hour, min, sec: LONGINT;
|
||||||
BEGIN
|
BEGIN
|
||||||
time.Now(year, month, day, hour, min, sec);
|
time.Now(year, month, day, hour, min, sec);
|
||||||
|
|
||||||
Out.Int(year, 4);
|
LogInt(year);
|
||||||
Out.String("/");
|
Out.String("/");
|
||||||
Out.Int(month, 2);
|
LogInt(month);
|
||||||
Out.String("/");
|
Out.String("/");
|
||||||
Out.Int(day, 2);
|
LogInt(day);
|
||||||
Out.String(" ");
|
Out.String(" ");
|
||||||
Out.Int(hour, 2);
|
LogInt(hour);
|
||||||
Out.String("-");
|
Out.String("-");
|
||||||
Out.Int(min, 2);
|
LogInt(min);
|
||||||
Out.String("-");
|
Out.String("-");
|
||||||
Out.Int(sec, 2);
|
LogInt(sec);
|
||||||
Out.String(" ");
|
Out.String(" ");
|
||||||
Out.String(buff);
|
Out.String(buff);
|
||||||
Out.Ln;
|
Out.Ln;
|
||||||
|
|
|
||||||
25
makefile
25
makefile
|
|
@ -2,19 +2,20 @@
|
||||||
VOC = /opt/voc/bin/voc
|
VOC = /opt/voc/bin/voc
|
||||||
|
|
||||||
all:
|
all:
|
||||||
$(VOC) -s types.Mod sockets.Mod netdb.Mod Internet.Mod stringHelpers.Mod time.Mod IRC.Mod test.Mod -m
|
cd builds && \
|
||||||
|
$(VOC) -s \
|
||||||
http:
|
../time.Mod \
|
||||||
$(VOC) -s types.Mod sockets.Mod netdb.Mod Internet.Mod time.Mod logger.Mod http.Mod -m
|
../logger.Mod \
|
||||||
|
../diaspora2hugo/src/lists/Sys.Mod \
|
||||||
|
../diaspora2hugo/src/lists/List.Mod \
|
||||||
|
../CharacterStack.Mod \
|
||||||
|
../HashMapString.Mod -m
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm *.h &
|
cd builds && rm * &
|
||||||
rm *.c &
|
|
||||||
rm *.o &
|
|
||||||
rm *.sym &
|
|
||||||
rm http &
|
|
||||||
rm CharaterStack &
|
|
||||||
|
|
||||||
test: clean http
|
run:
|
||||||
./http
|
./builds/HashMap
|
||||||
|
|
||||||
|
test: clean all run
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue