libk  Check-in [3e3a628048]

Overview
Comment:fix embarassing example
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 3e3a6280489846272fd404527e7dcfcb7952fa50de4eed0c0006b67da780398e
User & Date: lexi on 2019-06-27 12:17:37
Other Links: manifest | tags
Context
2019-06-27
12:18
fix typo check-in: 56e588d048 user: lexi tags: trunk
12:17
fix embarassing example check-in: 3e3a628048 user: lexi tags: trunk
12:13
updates check-in: 21467a6dc9 user: lexi tags: trunk
Changes

Modified libk.md from [f5443bdd6c] to [9f749c2fa4].

39
40
41
42
43
44
45
46
47
48
49
50
51
52
53

in the **short** convention, identifiers are prefixed by the letter `k` followed by the module's "glyph" -- a one- or two-letter sequence that represents the module, usually the first one or two characters. therefore, `kfile/open.c` is invoked as `kfopen`.

which naming convention a module uses should be specified at the top of its documentation. if it uses the short convention, its glyph should be specified as well

in both naming conventions, the following rules apply:

 1. the possible values of enumeration types are always preceded by the name of the enumeration type and an underscore. for instance, the enum `kschain_kind` has a value named `kschain_kind_block`. **exception:** an enum named `<S>_kind`, where `<S>` is a struct type, may simply use the prefix `<S>_`.
 2. macros begin with the uppercase letter `K` -- e.g. `Kmacro`. macros that can be defined by the user to alter the behavior of the api should begin with `KF` if they are on/off flags, or `KV` otherwise.
 3. capital letters are only used in macro prefixes.
 4. low-level function names are prefixed with the API they call into. for example, the function that performs the POSIX syscall `write` is named `kio_posix_fd_write`.a wrapper around the Windows function `CreateProcess()` might be called `kproc_win_createprocess`.

### atoms

libk uses the concept of "atoms" (small, regular strings of text) to standardize common references, such as operating systems or processor architectures.







|







39
40
41
42
43
44
45
46
47
48
49
50
51
52
53

in the **short** convention, identifiers are prefixed by the letter `k` followed by the module's "glyph" -- a one- or two-letter sequence that represents the module, usually the first one or two characters. therefore, `kfile/open.c` is invoked as `kfopen`.

which naming convention a module uses should be specified at the top of its documentation. if it uses the short convention, its glyph should be specified as well

in both naming conventions, the following rules apply:

 1. the possible values of enumeration types are always preceded by the name of the enumeration type and an underscore. for instance, the enum `ksalloc` has a value named `ksalloc_static`. **exception:** an enum named `<S>_kind`, where `<S>` is a struct type, may simply use the prefix `<S>_`.
 2. macros begin with the uppercase letter `K` -- e.g. `Kmacro`. macros that can be defined by the user to alter the behavior of the api should begin with `KF` if they are on/off flags, or `KV` otherwise.
 3. capital letters are only used in macro prefixes.
 4. low-level function names are prefixed with the API they call into. for example, the function that performs the POSIX syscall `write` is named `kio_posix_fd_write`.a wrapper around the Windows function `CreateProcess()` might be called `kproc_win_createprocess`.

### atoms

libk uses the concept of "atoms" (small, regular strings of text) to standardize common references, such as operating systems or processor architectures.