1;
2; Ullrich von Bassewitz, 2003-08-12, 2005-04-16
3;
4; Place to store the current working directory.
5;
6; __cwd is initialized by a platform specific function named "initcwd" called
7; by the constructor defined in this module.
8;
9
10        .export         __cwd
11        .export         __cwd_buf_size
12        .constructor    cwd_init
13
14        .import         initcwd
15
16        .include        "stdio.inc"
17
18        __cwd_buf_size  = FILENAME_MAX
19
20        cwd_init        := initcwd
21
22.segment        "INIT"
23
24__cwd:  .res    __cwd_buf_size
25
26
27; NOTE: Some of the code working with directories is not able to handle
28; strings longer than 255 chars, so don't make __cwd larger than 256 without
29; checking the other sources.
30
31        .assert __cwd_buf_size < 256, error, "__cwd_buf_size must not be > 255"
32