diff options
| author | Laurent Bercot <ska-skaware@skarnet.org> | 2026-10-09 00:59:02 +0000 |
|---|---|---|
| committer | Laurent Bercot <ska-skaware@skarnet.org> | 2026-10-09 00:59:02 +0000 |
| commit | c71344185cc93d9322513a1d9506cb14b1c308a2 (patch) | |
| tree | f52094f03bc4e18e97e1c27786b55c1738a76f7c /src/libs6rc/s6rc_get_major.c | |
| parent | a6883e06261447cec639c6d260270ec0664c2153 (diff) | |
| download | s6-rc-c71344185cc93d9322513a1d9506cb14b1c308a2.tar.gz | |
But this day is not today, so screw it. We gotta keep em separated
Diffstat (limited to 'src/libs6rc/s6rc_get_major.c')
| -rw-r--r-- | src/libs6rc/s6rc_get_major.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/src/libs6rc/s6rc_get_major.c b/src/libs6rc/s6rc_get_major.c deleted file mode 100644 index 3bb9fb1..0000000 --- a/src/libs6rc/s6rc_get_major.c +++ /dev/null @@ -1,21 +0,0 @@ -/* ISC license. */ - -#include <stdint.h> - -#include <skalibs/uint16.h> - -#include <s6-rc/s6rc-utils.h> - -uint32_t s6rc_get_major (char const *s) -{ - size_t len = 0, l ; - uint32_t acc = 0 ; - uint16_t u ; - l = uint16_scan(s + len, &u) ; - if (!l || s[len + l++] != '.') return 0 ; - len += l ; acc = acc << 16 | u ; - l = uint16_scan(s + len, &u) ; - if (!l || s[len + l++] != '.') return 0 ; - len += l ; acc = acc << 16 | u ; - return acc ; -} |
