Changes of Revision 292
libosmocore.spec
Changed
x
1
2
3
Name: libosmocore
4
Requires: osmocom-master
5
-Version: 1.9.0.109.b8f3
6
+Version: 1.9.0.111.0f59
7
Release: 0
8
Summary: The Open Source Mobile Communications Core Library
9
License: GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND AGPL-3.0-or-later
10
Group: Productivity/Telephony/Utilities
11
Url: https://osmocom.org/projects/libosmocore/wiki/Libosmocore
12
-Source: libosmocore_1.9.0.109.b8f3.tar.xz
13
+Source: libosmocore_1.9.0.111.0f59.tar.xz
14
Source1: rpmlintrc
15
BuildRequires: automake >= 1.6
16
BuildRequires: libtool >= 2
17
commit_0f59cebf081edc20d8a7b19cb799810446fc2ab3.txt
Added
commit_b8f3bba72174e057bf7504db6f6e0999b35633d7.txt
Deleted
libosmocore_1.9.0.109.b8f3.dsc -> libosmocore_1.9.0.111.0f59.dsc
Changed
22
1
2
Source: libosmocore
3
Binary: libosmocore, libosmocodec4, libosmocodec-doc, libosmocoding0, libosmocoding-doc, libosmocore21, libosmocore-doc, libosmogb14, libosmogb-doc, libosmogsm20, libosmogsm-doc, libosmoisdn0, libosmoisdn-doc, libosmovty13, libosmovty-doc, libosmoctrl0, libosmoctrl-doc, libosmosim2, libosmosim-doc, libosmousb0, libosmousb-doc, libosmocore-dev, libosmocore-utils, libosmocore-dbg
4
Architecture: any all
5
-Version: 1.9.0.109.b8f3
6
+Version: 1.9.0.111.0f59
7
Maintainer: Osmocom team <openbsc@lists.osmocom.org>
8
Homepage: https://projects.osmocom.org/projects/libosmocore
9
Standards-Version: 3.9.8
10
11
libosmovty-doc deb doc optional arch=all
12
libosmovty13 deb libs optional arch=any
13
Checksums-Sha1:
14
- fe673fd9459f586747fd089d1d228608ff071694 1091720 libosmocore_1.9.0.109.b8f3.tar.xz
15
+ 46c01a836fb628136a0ab3b3317e2b7f148d3644 1091672 libosmocore_1.9.0.111.0f59.tar.xz
16
Checksums-Sha256:
17
- 9484977bbc464010fc1825cc8948683b93e7ba0d92420cd6d6ef185287701133 1091720 libosmocore_1.9.0.109.b8f3.tar.xz
18
+ 7c252d1f8ef541b69080a24321465d1f3192bafdae1415a2db37f47ae02bc989 1091672 libosmocore_1.9.0.111.0f59.tar.xz
19
Files:
20
- 27b8aec34c88dce100451cee6390e5ee 1091720 libosmocore_1.9.0.109.b8f3.tar.xz
21
+ f4f4187a83090439c6137d9e92aa4010 1091672 libosmocore_1.9.0.111.0f59.tar.xz
22
libosmocore_1.9.0.109.b8f3.tar.xz/.tarball-version -> libosmocore_1.9.0.111.0f59.tar.xz/.tarball-version
Changed
4
1
2
-1.9.0.109-b8f3
3
+1.9.0.111-0f59
4
libosmocore_1.9.0.109.b8f3.tar.xz/debian/changelog -> libosmocore_1.9.0.111.0f59.tar.xz/debian/changelog
Changed
12
1
2
-libosmocore (1.9.0.109.b8f3) unstable; urgency=medium
3
+libosmocore (1.9.0.111.0f59) unstable; urgency=medium
4
5
* Automatically generated changelog entry for building the Osmocom master feed
6
7
- -- Osmocom OBS scripts <info@osmocom.org> Fri, 29 Dec 2023 17:57:27 +0000
8
+ -- Osmocom OBS scripts <info@osmocom.org> Sat, 30 Dec 2023 16:17:38 +0000
9
10
libosmocore (1.9.0) unstable; urgency=medium
11
12
libosmocore_1.9.0.109.b8f3.tar.xz/include/osmocom/core/utils.h -> libosmocore_1.9.0.111.0f59.tar.xz/include/osmocom/core/utils.h
Changed
44
1
2
#define OSMO_STRBUF_PRINTF(STRBUF, fmt, args...) \
3
OSMO_STRBUF_APPEND(STRBUF, snprintf, fmt, ##args)
4
5
+/*! Get remaining space for characters and terminating nul in the given struct osmo_strbuf.
6
+ * \paramin sb the string buffer to get the remaining space for.
7
+ * \returns remaining space in the given struct osmo_strbuf. */
8
+static inline size_t _osmo_strbuf_remain(const struct osmo_strbuf *sb)
9
+{
10
+ if (OSMO_UNLIKELY(sb == NULL || sb->buf == NULL))
11
+ return 0;
12
+ if (sb->pos == NULL)
13
+ return sb->len;
14
+ return sb->len - (sb->pos - sb->buf);
15
+}
16
+
17
/*! Return remaining space for characters and terminating nul in the given struct osmo_strbuf. */
18
-#define OSMO_STRBUF_REMAIN(STRBUF) ((STRBUF).buf ? (STRBUF).len - ((STRBUF).pos - (STRBUF).buf) : 0)
19
+#define OSMO_STRBUF_REMAIN(STRBUF) \
20
+ _osmo_strbuf_remain(&(STRBUF))
21
+
22
+/*! Get number of actual characters (without terminating nul) in the given struct osmo_strbuf.
23
+ * \paramin sb the string buffer to get the number of characters for.
24
+ * \returns number of actual characters (without terminating nul). */
25
+static inline size_t _osmo_strbuf_char_count(const struct osmo_strbuf *sb)
26
+{
27
+ if (OSMO_UNLIKELY(sb == NULL || sb->buf == NULL))
28
+ return 0;
29
+ if (sb->pos == NULL || sb->pos <= sb->buf)
30
+ return 0;
31
+ return OSMO_MIN(sb->pos - sb->buf, sb->len - 1);
32
+}
33
34
/*! Return number of actual characters contained in struct osmo_strbuf (without terminating nul). */
35
-#define OSMO_STRBUF_CHAR_COUNT(STRBUF) ((STRBUF).buf && ((STRBUF).pos > (STRBUF).buf) ? \
36
- OSMO_MIN((STRBUF).pos - (STRBUF).buf, \
37
- (STRBUF).len - 1) \
38
- : 0)
39
+#define OSMO_STRBUF_CHAR_COUNT(STRBUF) \
40
+ _osmo_strbuf_char_count(&(STRBUF))
41
42
/*! Like OSMO_STRBUF_APPEND(), but for function signatures that return the char* buffer instead of a length.
43
* When using this function, the final STRBUF.chars_needed may not reflect the actual number of characters needed, since
44
libosmocore_1.9.0.109.b8f3.tar.xz/tests/utils/utils_test.c -> libosmocore_1.9.0.111.0f59.tar.xz/tests/utils/utils_test.c
Changed
33
1
2
strbuf_test_tail_for_buflen(1);
3
}
4
5
+void strbuf_test_remain_char_count(void)
6
+{
7
+ char buf20;
8
+ struct osmo_strbuf sb = { .buf = buf, .len = sizeof(buf) };
9
+
10
+ printf("\n%s\n", __func__);
11
+
12
+ printf("remaining space: %zu\n", OSMO_STRBUF_REMAIN(sb));
13
+ printf("current char count: %zu\n", OSMO_STRBUF_CHAR_COUNT(sb));
14
+
15
+ printf("populating the buffer\n");
16
+ OSMO_STRBUF_PRINTF(sb, "osmocom");
17
+
18
+ printf("remaining space: %zu\n", OSMO_STRBUF_REMAIN(sb));
19
+ printf("current char count: %zu\n", OSMO_STRBUF_CHAR_COUNT(sb));
20
+}
21
+
22
static void startswith_test_str(const char *str, const char *startswith_str, bool expect_rc)
23
{
24
bool rc = osmo_str_startswith(str, startswith_str);
25
26
strbuf_test();
27
strbuf_test_nolen();
28
strbuf_test_tail();
29
+ strbuf_test_remain_char_count();
30
startswith_test();
31
name_c_impl_test();
32
osmo_print_n_test();
33
libosmocore_1.9.0.109.b8f3.tar.xz/tests/utils/utils_test.ok -> libosmocore_1.9.0.111.0f59.tar.xz/tests/utils/utils_test.ok
Changed
15
1
2
6: "" sb.chars_needed=6 sb.pos=&sb.buf1
3
7: "" sb.chars_needed=12 sb.pos=&sb.buf1
4
5
+strbuf_test_remain_char_count
6
+remaining space: 20
7
+current char count: 0
8
+populating the buffer
9
+remaining space: 13
10
+current char count: 7
11
+
12
startswith_test()
13
osmo_str_startswith(NULL, NULL) == true
14
osmo_str_startswith("", NULL) == true
15