author | Olivier Brunel
<jjk@jjacky.com> 2023-07-02 15:34:32 UTC |
committer | Olivier Brunel
<jjk@jjacky.com> 2023-07-24 10:16:42 UTC |
parent | 527248b0ca4ce7eebe376df8b84d36c80002f036 |
src/doc/u16.h.0.md | +38 | -41 |
src/doc/u16.h/{u160_bfmt.3.md => u16_0bfmt.3.md} | +0 | -0 |
src/doc/u16.h/{u160_fmt.3.md => u16_0fmt.3.md} | +0 | -0 |
src/doc/u16.h/{u160_ofmt.3.md => u16_0fmtg.3.md} | +0 | -0 |
src/doc/u16.h/{u160_xfmt.3.md => u16_0ofmt.3.md} | +0 | -0 |
src/doc/u16.h/u16_0xfmt.3.md | +1 | -0 |
src/doc/u16.h/{u160_bscan.3.md => u16_bscan0.3.md} | +0 | -0 |
src/doc/u16.h/u16_fmt.3.md | +17 | -16 |
src/doc/u16.h/u16_le.3.md | +13 | -14 |
src/doc/u16.h/{u160_oscan.3.md => u16_oscan0.3.md} | +0 | -0 |
src/doc/u16.h/u16_pack.3.md | +14 | -12 |
src/doc/u16.h/u16_scan.3.md | +17 | -17 |
src/doc/u16.h/{u160_scan.3.md => u16_scan0.3.md} | +0 | -0 |
src/doc/u16.h/{u160_xscan.3.md => u16_xscan0.3.md} | +0 | -0 |
src/liblimb/djbunix.h/open_parsed_name.c | +1 | -1 |
src/liblimb/include/limb/u16.h | +9 | -9 |
src/mkrabintables/mkrabintables.c | +3 | -3 |
diff --git a/src/doc/u16.h.0.md b/src/doc/u16.h.0.md index 59a947b..4d603a5 100644 --- a/src/doc/u16.h.0.md +++ b/src/doc/u16.h.0.md @@ -12,8 +12,6 @@ u16.h - 16bit unsigned integers # DESCRIPTION This header defines functions allowing to work with 16bit unsigned integers. -It is mainly composed of macros to their `uint16_*` counterparts, offering -slightly different interfaces. ## Constants @@ -40,87 +38,86 @@ The following constants are defined : The following functions/macros are defined : : [u16_be](3) -:: Same as [uint16_big](3) +:: Convert a u16 number to big endian. : [u16_le](3) -:: Same as [uint16_little](3) +:: Convert a u16 number to little endian. : [u16p_be](3) -:: Same as [uint16_bigp](3) +:: Similar to [u16_be](3) but takes a pointer. : [u16p_le](3) -:: Same as [uint16_littlep](3) +:: Similar to [u16_le](3) but takes a pointer. : [u16pa_be](3) -:: Same as [uint16_bign](3) +:: Similar to [u16p_be](3) but for an array of pointers. : [u16pa_le](3) -:: Same as [uint16_littlen](3) +:: Similar to [u16p_le](3) but for an array of pointers. : [u16_pack](3) -:: Same as [uint16_pack](3) +:: Store a u16 number encoded in little endian. : [u16_unpack](3) -:: Same as [uint16_unpack](3) +:: Read a u16 number encoded in little endian. : [u16_pack_big](3) -:: Same as [uint16_pack_big](3) +:: Store a u16 number encoded in big endian. : [u16_unpack_big](3) -:: Same as [uint16_unpack_big](3) +:: Read a u16 number encoded in big endian. : [u16_fmt](3) -:: Print u16 value as decimal into given byte array +:: Write a u16 number as decimal into a byte array. : [u16_fmtg](3) -:: Print u16 value as decimal, using coma as thousand separator, into given byte -:: array +:: Write a u16 number as decimal, using coma as thousand separator, into a +:: byte array. : [u16_bfmt](3) -:: Same as [u16_fmt](3) but as binary +:: Similar to [u16_fmt](3) but as binary. : [u16_ofmt](3) -:: Same as [u16_fmt](3) but as octal +:: Similar to [u16_fmt](3) but as octal. : [u16_xfmt](3) -:: Same as [u16_fmt](3) but as hexadecimal +:: Similar to [u16_fmt](3) but as hexadecimal. -: [u160_fmt](3) -:: Same as [u16_fmt](3) but filling with zeroes if less than given size +: [u16_0fmt](3) +:: Similar to [u16_fmt](3) but filling with zeroes if less than given size. -: [u160_fmtg](3) -:: Same as [u16_fmtg](3) but filling with zeroes if less than given size +: [u16_0fmtg](3) +:: Similar to [u16_fmtg](3) but filling with zeroes if less than given size. -: [u160_bfmt](3) -:: Same as [u16_bfmt](3) but filling with zeroes if less than given size +: [u16_0bfmt](3) +:: Similar to [u16_bfmt](3) but filling with zeroes if less than given size. -: [u160_ofmt](3) -:: Same as [u16_ofmt](3) but filling with zeroes if less than given size +: [u16_0ofmt](3) +:: Similar to [u16_ofmt](3) but filling with zeroes if less than given size. -: [u160_xfmt](3) -:: Same as [u16_xfmt](3) but filling with zeroes if less than given size +: [u16_0xfmt](3) +:: Similar to [u16_xfmt](3) but filling with zeroes if less than given size. : [u16_scan](3) -:: Read given byte array for decimal u16 value and load into given variable +:: Read a u16 value from a byte array. : [u16_bscan](3) -:: Same as [u16_scan](3) but for binary value +:: Similar to [u16_scan](3) but for binary value. : [u16_oscan](3) -:: Same as [u16_scan](3) but for octal value +:: Similar to [u16_scan](3) but for octal value. : [u16_xscan](3) -:: Same as [u16_scan](3) but for hexadecimal value +:: Similar to [u16_scan](3) but for hexadecimal value. -: [u160_scan](3) -:: Same as [u16_scan](3) but expects a NUL-terminated string +: [u16_scan0](3) +:: Similar to [u16_scan](3) but expects a NUL-terminated string. -: [u160_bscan](3) -:: Same as [u16_bscan](3) but expects a NUL-terminated string +: [u16_bscan0](3) +:: Similar to [u16_bscan](3) but expects a NUL-terminated string. -: [u160_oscan](3) -:: Same as [u16_oscan](3) but expects a NUL-terminated string - -: [u160_xscan](3) -:: Same as [u16_xscan](3) but expects a NUL-terminated string +: [u16_oscan0](3) +:: Similar to [u16_oscan](3) but expects a NUL-terminated string. +: [u16_xscan0](3) +:: Similar to [u16_xscan](3) but expects a NUL-terminated string. diff --git a/src/doc/u16.h/u160_bfmt.3.md b/src/doc/u16.h/u16_0bfmt.3.md similarity index 100% rename from src/doc/u16.h/u160_bfmt.3.md rename to src/doc/u16.h/u16_0bfmt.3.md diff --git a/src/doc/u16.h/u160_fmt.3.md b/src/doc/u16.h/u16_0fmt.3.md similarity index 100% rename from src/doc/u16.h/u160_fmt.3.md rename to src/doc/u16.h/u16_0fmt.3.md diff --git a/src/doc/u16.h/u160_ofmt.3.md b/src/doc/u16.h/u16_0fmtg.3.md similarity index 100% rename from src/doc/u16.h/u160_ofmt.3.md rename to src/doc/u16.h/u16_0fmtg.3.md diff --git a/src/doc/u16.h/u160_xfmt.3.md b/src/doc/u16.h/u16_0ofmt.3.md similarity index 100% rename from src/doc/u16.h/u160_xfmt.3.md rename to src/doc/u16.h/u16_0ofmt.3.md diff --git a/src/doc/u16.h/u16_0xfmt.3.md b/src/doc/u16.h/u16_0xfmt.3.md new file mode 120000 index 0000000..9f6fde5 --- /dev/null +++ b/src/doc/u16.h/u16_0xfmt.3.md @@ -0,0 +1 @@ +u16_fmt.3.md \ No newline at end of file diff --git a/src/doc/u16.h/u160_bscan.3.md b/src/doc/u16.h/u16_bscan0.3.md similarity index 100% rename from src/doc/u16.h/u160_bscan.3.md rename to src/doc/u16.h/u16_bscan0.3.md diff --git a/src/doc/u16.h/u16_fmt.3.md b/src/doc/u16.h/u16_fmt.3.md index 8693bbc..8601155 100644 --- a/src/doc/u16.h/u16_fmt.3.md +++ b/src/doc/u16.h/u16_fmt.3.md @@ -3,13 +3,13 @@ # NAME -u16\_fmt, u16\_fmtg, u160\_fmt - print an u16 as decimal value into a byte array +u16_fmt, u16_fmtg, u16_0fmt - write an u16 as decimal value into a byte array -u16\_xfmt, u160\_xfmt - print an u16 as hexadecimal value into a byte array +u16_xfmt, u16_0xfmt - write an u16 as hexadecimal value into a byte array -u16\_ofmt, u160\_ofmt - print an u16 as octal value into a byte array +u16_ofmt, u16_0ofmt - write an u16 as octal value into a byte array -u16\_bfmt, u160\_bfmt - print an u16 as binary value into a byte array +u16_bfmt, u16_0bfmt - write an u16 as binary value into a byte array # SYNOPSIS @@ -18,43 +18,44 @@ u16\_bfmt, u160\_bfmt - print an u16 as binary value into a byte array ```pre hl size_t u16_fmt(char *<em>s</em>, u16 <em>u</em>) -size_t u160_fmt(char *<em>s</em>, u16 <em>u</em>, size_t <em>min</em>) +size_t u16_0fmt(char *<em>s</em>, u16 <em>u</em>, size_t <em>min</em>) size_t u16_fmtg(char *<em>s</em>, u16 <em>u</em>) -size_t u160_fmtg(char *<em>s</em>, u16 <em>u</em>, size_t <em>min</em>) +size_t u16_0fmtg(char *<em>s</em>, u16 <em>u</em>, size_t <em>min</em>) size_t u16_xfmt(char *<em>s</em>, u16 <em>u</em>) -size_t u160_xfmt(char *<em>s</em>, u16 <em>u</em>, size_t <em>min</em>) +size_t u16_0xfmt(char *<em>s</em>, u16 <em>u</em>, size_t <em>min</em>) size_t u16_ofmt(char *<em>s</em>, u16 <em>u</em>) -size_t u160_ofmt(char *<em>s</em>, u16 <em>u</em>, size_t <em>min</em>) +size_t u16_0ofmt(char *<em>s</em>, u16 <em>u</em>, size_t <em>min</em>) size_t u16_bfmt(char *<em>s</em>, u16 <em>u</em>) -size_t u160_bfmt(char *<em>s</em>, u16 <em>u</em>, size_t <em>min</em>) +size_t u16_0bfmt(char *<em>s</em>, u16 <em>u</em>, size_t <em>min</em>) ``` # DESCRIPTION -The `u16_fmt`() function will put into `s` the value of `u` in decimal. -The `u160_fmt`() function will put into `s` the value of `u` in decimal, +The `u16_fmt`() macro will write into `s` the value of `u` in decimal. +The `u16_0fmt`() macro will write into `s` the value of `u` in decimal, prefixing it with leading zeroes if it requires less than `min` characters to do so. -The `u16_fmtg`() and `u160_fmtg`() function are similar, only they will use a +The `u16_fmtg`() and `u16_0fmtg`() macros are similar, only they will use a coma (`,`) as thousand separator as needed. -The `u16_xfmt`() and `u160_xfmt`() functions are similar, only putting the value +The `u16_xfmt`() and `u16_0xfmt`() macros are similar, only putting the value of `u` in hexadecimal. -The `u16_ofmt`() and `u160_ofmt`() functions are similar, only putting the value +The `u16_ofmt`() and `u16_0ofmt`() macros are similar, only putting the value of `u` in octal. -The `u16_bfmt`() and `u160_bfmt`() functions are similar, only putting the value +The `u16_bfmt`() and `u16_0bfmt`() macros are similar, only putting the value of `u` in binary. It is possible to use `NULL` as `s` to only have length computation performed. -Note that those are macros to [u64_fmt_generic](3). +! INFO: Generic functions +! Note that those are macros to [u64_fmt_generic](3) and [u64_0fmt_generic](3). ## Constants diff --git a/src/doc/u16.h/u16_le.3.md b/src/doc/u16.h/u16_le.3.md index b1539ff..35d9cde 100644 --- a/src/doc/u16.h/u16_le.3.md +++ b/src/doc/u16.h/u16_le.3.md @@ -3,11 +3,9 @@ # NAME -u16\_le, u16\_be - convert a value to little\/big endian +u16_le, u16_be, u16p_le, u16p_be - convert an u16 to little/big endian -u16p\_le, u16p\_be - convert an u16 into little\/big endian - -u16pa\_le, u16pa\_be - convert an array of u16 into little\/big endian +u16pa_le, u16pa_be - convert an array of u16 into little/big endian # SYNOPSIS @@ -20,25 +18,26 @@ u16 u16_be(u16 <em>u</em>) void u16p_le(u16 *<em>val</em>) void u16p_be(u16 *<em>val</em>) -void u16pa_le(u16 *<em>val</em>, size_t <em>length</em>) -void u16pa_be(u16 *<em>val</em>, size_t <em>length</em>) +void u16pa_le(u16 *<em>val</em>, size_t <em>len</em>) +void u16pa_be(u16 *<em>val</em>, size_t <em>len</em>) ``` # DESCRIPTION All of these aim to ensure a value or variable is in expected endianness. -The `u16_le`() and `u16_be`() functions will return the value after having read -the given number `u` as a little endian and big endian value respectively. +The `u16_le`() and `u16_be`() macros will return the value after having read +the given number `u` as a little endian or big endian value, respectively. -The `u16p_le`() and `u16p_be`() functions are similar, only they take a pointer -to an u16 and will convert it into little endian and big endian, respectively. +The `u16p_le`() and `u16p_be`() macros are similar, only they take a pointer +to an u16 and will convert it into little endian or big endian, respectively. -Finally the `u16pa_le`() and `u16pa_be`() are similar to the previous two, only -they take an array of u16 of size `length` and convert every element. +Finally the `u16pa_le`() and `u16pa_be`() macros are similar to the previous +two, only they take an array of u16 of size `len` and convert every element. -These are actually macros to the relevant `uint16_*` functions as needed, i.e. -if the requested endianness is that of the host, no operation is performed. +! NOTE: +! Note that these are macros they may be either no-op or byte swapping functions +! depending on the endianness of the host. # RETURN VALUE diff --git a/src/doc/u16.h/u160_oscan.3.md b/src/doc/u16.h/u16_oscan0.3.md similarity index 100% rename from src/doc/u16.h/u160_oscan.3.md rename to src/doc/u16.h/u16_oscan0.3.md diff --git a/src/doc/u16.h/u16_pack.3.md b/src/doc/u16.h/u16_pack.3.md index 0a3ffae..6eb657b 100644 --- a/src/doc/u16.h/u16_pack.3.md +++ b/src/doc/u16.h/u16_pack.3.md @@ -3,8 +3,8 @@ # NAME -u16\_pack, u16\_unpack, u16\_pack\_big, u16\_unpack\_big - pack\/unpack an -integer (u16) into\/from a byte array +u16_pack, u16_unpack, u16_pack_big, u16_unpack_big - store/read an u16 into/from +a byte array # SYNOPSIS @@ -13,21 +13,23 @@ integer (u16) into\/from a byte array ```pre hl void u16_pack(void *<em>dst</em>, u16 <em>val</em>) void u16_unpack(u16 *<em>val</em>, const void *<em>sce</em>) + void u16_pack_big(void *<em>dst</em>, u16 <em>val</em>) -void 164_unpack_big(u16 *<em>val</em>, const void *<em>sce</em>) +void u16_unpack_big(u16 *<em>val</em>, const void *<em>sce</em>) ``` # DESCRIPTION -All of these aim to either pack the given integer (u16) `val` into the specified -byte array `dst`, or unpack from the specified byte array `sce` the integer -value into the pointed `val`. +All of these aim to either store the given number `val` into the specified +byte array `dst`, or read a number from the specified byte array `sce` and set +the value pointed by `val` to its value. + +The `u16_pack`() function stores the number `val` into the 2 bytes pointed by +`dst`, encoded as little endian. -The `u16_pack`() function packs `val` into 2 bytes encoded as little endian, the -`u16_pack_big`() function does the same encoded as big endian. +The `u16_unpack`() function reads 2 bytes pointed by `sce` as little endian +encoded number, setting the value pointed by `val` to its value. -The `u16_unpack` family does the same, only unpacking from the byte array `sce` -into `val` +The `u16_pack_big`() function is similar to `u16_pack`() only as big endian. -These are actually macros to the relevant `uint16_*` functions, offering a -slightly different interface. +The `u16_unpack_big`() function is similar to `u16_unpack`() only as big endian. diff --git a/src/doc/u16.h/u16_scan.3.md b/src/doc/u16.h/u16_scan.3.md index fb79fe7..d01c0cc 100644 --- a/src/doc/u16.h/u16_scan.3.md +++ b/src/doc/u16.h/u16_scan.3.md @@ -3,13 +3,13 @@ # NAME -u16\_scan, u160\_scan - Read an u16 value from a decimal string +u16_scan, u16_scan0 - Read an u16 value from a decimal string -u16\_xscan, u160\_xscan - Read an u16 value from an hexadecimal string +u16_xscan, u16_xscan0 - Read an u16 value from an hexadecimal string -u16\_oscan, u160\_oscan - Read an u16 value from an octal string +u16_oscan, u16_oscan0 - Read an u16 value from an octal string -u16\_bscan, u160\_bscan - Read an u16 value from a binary string +u16_bscan, u16_bscan0 - Read an u16 value from a binary string # SYNOPSIS @@ -18,16 +18,16 @@ u16\_bscan, u160\_bscan - Read an u16 value from a binary string ```pre hl size_t u16_scan(u16 *<em>dst</em>, const char *<em>s</em>) -size_t u160_scan(u16 *<em>dst</em>, const char *<em>s</em>) +size_t u16_scan0(u16 *<em>dst</em>, const char *<em>s</em>) size_t u16_xscan(u16 *<em>dst</em>, const char *<em>s</em>) -size_t u160_xscan(u16 *<em>dst</em>, const char *<em>s</em>) +size_t u16_xscan0(u16 *<em>dst</em>, const char *<em>s</em>) size_t u16_oscan(u16 *<em>dst</em>, const char *<em>s</em>) -size_t u160_oscan(u16 *<em>dst</em>, const char *<em>s</em>) +size_t u16_oscan0(u16 *<em>dst</em>, const char *<em>s</em>) size_t u16_bscan(u16 *<em>dst</em>, const char *<em>s</em>) -size_t u160_bscan(u16 *<em>dst</em>, const char *<em>s</em>) +size_t u16_bscan0(u16 *<em>dst</em>, const char *<em>s</em>) ``` # DESCRIPTION @@ -35,30 +35,30 @@ size_t u160_bscan(u16 *<em>dst</em>, const char *<em>s</em>) The `u16_scan`() function will place into `dst` the number read as a decimal value from the string `s`, stopping as soon as a character isn't valid. -The `u160_scan`() function is similar but expects the string to contain a valid +The `u16_scan0`() function is similar but expects the string to contain a valid value and nothing else, stopping with a NUL-terminating byte. -The `u16_xscan`() and `u160_xscan`() functions are similar, but expecting an +The `u16_xscan`() and `u16_xscan0`() functions are similar, but expecting an hexadecimal value in `s`. -The `u16_oscan`() and `u160_oscan`() functions are similar, but expecting an +The `u16_oscan`() and `u16_oscan0`() functions are similar, but expecting an octal value in `s`. -The `u16_bscan`() and `u160_bscan`() functions are similar, but expecting a +The `u16_bscan`() and `u16_bscan0`() functions are similar, but expecting a binary value in `s`. # RETURN VALUE -The `u16_*` family of functions return the number of characters read from `s` -(starting at 0 when the first character is invalid). +The `u16_*scan` family of functions return the number of characters read from +`s` (starting at 0 when the first character is invalid). -The `u160_*` family of functions return the number of characters read from `s` -or 0 on error. +The `u16_*scan0` family of functions return the number of characters read from +`s` or 0 on error. # ERRORS -The `u160_*` family of functions may fail and set `errno` if : +The `u16_*scan0` family of functions may fail and set `errno` if : : *EINVAL* :: Invalid character in `s` diff --git a/src/doc/u16.h/u160_scan.3.md b/src/doc/u16.h/u16_scan0.3.md similarity index 100% rename from src/doc/u16.h/u160_scan.3.md rename to src/doc/u16.h/u16_scan0.3.md diff --git a/src/doc/u16.h/u160_xscan.3.md b/src/doc/u16.h/u16_xscan0.3.md similarity index 100% rename from src/doc/u16.h/u160_xscan.3.md rename to src/doc/u16.h/u16_xscan0.3.md diff --git a/src/liblimb/djbunix.h/open_parsed_name.c b/src/liblimb/djbunix.h/open_parsed_name.c index 7002149..f2db0a0 100644 --- a/src/liblimb/djbunix.h/open_parsed_name.c +++ b/src/liblimb/djbunix.h/open_parsed_name.c @@ -13,7 +13,7 @@ open_parsed_name(const char *name, open_fn open) /* another '+' would mean file name starts with a '+' */ if (*name != '+') { u16 u; - if (!u160_scan(&u, name)) + if (!u16_scan0(&u, name)) return -1; return u; } diff --git a/src/liblimb/include/limb/u16.h b/src/liblimb/include/limb/u16.h index c1f9d44..26f26b9 100644 --- a/src/liblimb/include/limb/u16.h +++ b/src/liblimb/include/limb/u16.h @@ -33,20 +33,20 @@ #define u16_ofmt(s,u) u64_fmt_generic(s, (u), 8, 0, 0) #define u16_bfmt(s,u) u64_fmt_generic(s, (u), 2, 0, 0) -#define u160_fmt(s,u,m) u640_fmt_generic(s, (u), 10, (m), '0', 0, 0) -#define u160_fmtg(s,u,m) u640_fmt_generic(s, (u), 10, (m), '0', 3, ',') -#define u160_xfmt(s,u,m) u640_fmt_generic(s, (u), 16, (m), '0', 0, 0) -#define u160_ofmt(s,u,m) u640_fmt_generic(s, (u), 8, (m), '0', 0, 0) -#define u160_bfmt(s,u,m) u640_fmt_generic(s, (u), 2, (m), '0', 0, 0) +#define u16_0fmt(s,u,m) u64_0fmt_generic(s, (u), 10, (m), '0', 0, 0) +#define u16_0fmtg(s,u,m) u64_0fmt_generic(s, (u), 10, (m), '0', 3, ',') +#define u16_0xfmt(s,u,m) u64_0fmt_generic(s, (u), 16, (m), '0', 0, 0) +#define u16_0ofmt(s,u,m) u64_0fmt_generic(s, (u), 8, (m), '0', 0, 0) +#define u16_0bfmt(s,u,m) u64_0fmt_generic(s, (u), 2, (m), '0', 0, 0) #define u16_scan(dst,s) uint16_scan(s, (dst)) #define u16_xscan(dst,s) uint16_xscan(s, (dst)) #define u16_oscan(dst,s) uint16_oscan(s, (dst)) #define u16_bscan(dst,s) uint16_bscan(s, (dst)) -#define u160_scan(dst,s) uint160_scan(s, (dst)) -#define u160_xscan(dst,s) uint160_xscan(s, (dst)) -#define u160_oscan(dst,s) uint160_oscan(s, (dst)) -#define u160_bscan(dst,s) uint160_bscan(s, (dst)) +#define u16_scan0(dst,s) uint160_scan(s, (dst)) +#define u16_xscan0(dst,s) uint160_xscan(s, (dst)) +#define u16_oscan0(dst,s) uint160_oscan(s, (dst)) +#define u16_bscan0(dst,s) uint160_bscan(s, (dst)) #endif /* LIMB_U16_H */ diff --git a/src/mkrabintables/mkrabintables.c b/src/mkrabintables/mkrabintables.c index 8820a55..3c599d0 100644 --- a/src/mkrabintables/mkrabintables.c +++ b/src/mkrabintables/mkrabintables.c @@ -1,8 +1,8 @@ /* This file is part of limb https://lila.oss/limb * Copyright (C) 2023 Olivier Brunel jjk@jjacky.com */ /* SPDX-License-Identifier: GPL-2.0-only */ -#include <skalibs/uint16.h> -#include <limb/uint64.h> +#include <limb/u16.h> +#include <limb/u64.h> #include <limb/output.h> const char *PROG = "mkrabintables"; @@ -83,7 +83,7 @@ main(int argc, char **argv) struct rabin r = { .window_size = 32, }; if (argc == 2) { - if (!uint160_scan(argv[1], &r.window_size)) + if (!u16_scan0(&r.window_size, argv[1])) retw(1, "invalid window size"); } else if (argc != 1) { dieusage(1, "[WINDOWSIZE]");