Subversion Repositories Kolibri OS

Rev

Rev 7693 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7693 Rev 7696
Line 1... Line 1...
1
(*
1
(*
2
    BSD 2-Clause License
2
    BSD 2-Clause License
Line 3... Line 3...
3
 
3
 
4
    Copyright (c) 2019, Anton Krotov
4
    Copyright (c) 2019, Anton Krotov
5
    All rights reserved.
5
    All rights reserved.
Line 72... Line 72...
72
PROCEDURE init;
72
PROCEDURE init;
73
VAR
73
VAR
74
    ptr: INTEGER;
74
    ptr: INTEGER;
Line 75... Line 75...
75
 
75
 
-
 
76
BEGIN
-
 
77
 
76
BEGIN
78
    IF API.MainParam # 0 THEN
77
    envc := -1;
79
        envc := -1;
78
    SYSTEM.GET(API.MainParam, argc);
80
        SYSTEM.GET(API.MainParam, argc);
79
    REPEAT
81
        REPEAT
80
        SYSTEM.GET(API.MainParam + (envc + argc + 3) * SYSTEM.SIZE(INTEGER), ptr);
82
            SYSTEM.GET(API.MainParam + (envc + argc + 3) * SYSTEM.SIZE(INTEGER), ptr);
81
        INC(envc)
83
            INC(envc)
-
 
84
        UNTIL ptr = 0
-
 
85
    ELSE
-
 
86
        envc := 0;
-
 
87
        argc := 0
Line 82... Line 88...
82
    UNTIL ptr = 0;
88
    END;
Line 83... Line 89...
83
 
89
 
84
    libc := API.libc;
90
    libc := API.libc;