annotate libmlk-core/mlk/core/util.h @ 445:773a082f0b91

misc: update copyright years
author David Demelier <markand@malikania.fr>
date Wed, 01 Feb 2023 13:08:54 +0100
parents 8f59201dc76b
children 5729efd23286
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
39
9d1421c09dfb core: add more utilities to improve code simplicity
David Demelier <markand@malikania.fr>
parents:
diff changeset
1 /*
9d1421c09dfb core: add more utilities to improve code simplicity
David Demelier <markand@malikania.fr>
parents:
diff changeset
2 * util.h -- utilities
9d1421c09dfb core: add more utilities to improve code simplicity
David Demelier <markand@malikania.fr>
parents:
diff changeset
3 *
445
773a082f0b91 misc: update copyright years
David Demelier <markand@malikania.fr>
parents: 431
diff changeset
4 * Copyright (c) 2020-2023 David Demelier <markand@malikania.fr>
39
9d1421c09dfb core: add more utilities to improve code simplicity
David Demelier <markand@malikania.fr>
parents:
diff changeset
5 *
9d1421c09dfb core: add more utilities to improve code simplicity
David Demelier <markand@malikania.fr>
parents:
diff changeset
6 * Permission to use, copy, modify, and/or distribute this software for any
9d1421c09dfb core: add more utilities to improve code simplicity
David Demelier <markand@malikania.fr>
parents:
diff changeset
7 * purpose with or without fee is hereby granted, provided that the above
9d1421c09dfb core: add more utilities to improve code simplicity
David Demelier <markand@malikania.fr>
parents:
diff changeset
8 * copyright notice and this permission notice appear in all copies.
9d1421c09dfb core: add more utilities to improve code simplicity
David Demelier <markand@malikania.fr>
parents:
diff changeset
9 *
9d1421c09dfb core: add more utilities to improve code simplicity
David Demelier <markand@malikania.fr>
parents:
diff changeset
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9d1421c09dfb core: add more utilities to improve code simplicity
David Demelier <markand@malikania.fr>
parents:
diff changeset
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9d1421c09dfb core: add more utilities to improve code simplicity
David Demelier <markand@malikania.fr>
parents:
diff changeset
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
9d1421c09dfb core: add more utilities to improve code simplicity
David Demelier <markand@malikania.fr>
parents:
diff changeset
13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
9d1421c09dfb core: add more utilities to improve code simplicity
David Demelier <markand@malikania.fr>
parents:
diff changeset
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
9d1421c09dfb core: add more utilities to improve code simplicity
David Demelier <markand@malikania.fr>
parents:
diff changeset
15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
9d1421c09dfb core: add more utilities to improve code simplicity
David Demelier <markand@malikania.fr>
parents:
diff changeset
16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
9d1421c09dfb core: add more utilities to improve code simplicity
David Demelier <markand@malikania.fr>
parents:
diff changeset
17 */
9d1421c09dfb core: add more utilities to improve code simplicity
David Demelier <markand@malikania.fr>
parents:
diff changeset
18
366
19782ea1cf4a misc: start rebranding
David Demelier <markand@malikania.fr>
parents: 320
diff changeset
19 #ifndef MLK_CORE_UTIL_H
19782ea1cf4a misc: start rebranding
David Demelier <markand@malikania.fr>
parents: 320
diff changeset
20 #define MLK_CORE_UTIL_H
39
9d1421c09dfb core: add more utilities to improve code simplicity
David Demelier <markand@malikania.fr>
parents:
diff changeset
21
292
08ab73b32832 misc: add extern "C" {} blocks for C++ friends
David Demelier <markand@malikania.fr>
parents: 261
diff changeset
22 #include "core.h"
08ab73b32832 misc: add extern "C" {} blocks for C++ friends
David Demelier <markand@malikania.fr>
parents: 261
diff changeset
23
261
bfde372bf152 core: prefix utilities with util_
David Demelier <markand@malikania.fr>
parents: 253
diff changeset
24 #define UTIL_SIZE(x) sizeof ((x)) / sizeof ((x)[0])
47
f053a9f38c0e core: implement basic scrolling, closes #2459
David Demelier <markand@malikania.fr>
parents: 39
diff changeset
25
292
08ab73b32832 misc: add extern "C" {} blocks for C++ friends
David Demelier <markand@malikania.fr>
parents: 261
diff changeset
26 CORE_BEGIN_DECLS
08ab73b32832 misc: add extern "C" {} blocks for C++ friends
David Demelier <markand@malikania.fr>
parents: 261
diff changeset
27
39
9d1421c09dfb core: add more utilities to improve code simplicity
David Demelier <markand@malikania.fr>
parents:
diff changeset
28 void
298
196264679079 misc: remove usage of bool
David Demelier <markand@malikania.fr>
parents: 292
diff changeset
29 util_delay(unsigned int);
39
9d1421c09dfb core: add more utilities to improve code simplicity
David Demelier <markand@malikania.fr>
parents:
diff changeset
30
236
4896bb07a8db core: add pprintf function
David Demelier <markand@malikania.fr>
parents: 234
diff changeset
31 const char *
298
196264679079 misc: remove usage of bool
David Demelier <markand@malikania.fr>
parents: 292
diff changeset
32 util_pathf(const char *, ...);
236
4896bb07a8db core: add pprintf function
David Demelier <markand@malikania.fr>
parents: 234
diff changeset
33
185
7103d6574062 core: add nrand function
David Demelier <markand@malikania.fr>
parents: 182
diff changeset
34 unsigned int
298
196264679079 misc: remove usage of bool
David Demelier <markand@malikania.fr>
parents: 292
diff changeset
35 util_nrand(unsigned int, unsigned int);
185
7103d6574062 core: add nrand function
David Demelier <markand@malikania.fr>
parents: 182
diff changeset
36
292
08ab73b32832 misc: add extern "C" {} blocks for C++ friends
David Demelier <markand@malikania.fr>
parents: 261
diff changeset
37 CORE_END_DECLS
08ab73b32832 misc: add extern "C" {} blocks for C++ friends
David Demelier <markand@malikania.fr>
parents: 261
diff changeset
38
366
19782ea1cf4a misc: start rebranding
David Demelier <markand@malikania.fr>
parents: 320
diff changeset
39 #endif /* !MLK_CORE_UTIL_H */