skalibs

Mirror/fork of https://skarnet.org/software/skalibs/
git clone https://ccx.te2000.cz/git/skalibs
Log | Files | Refs | README | LICENSE

ip4_scanu32.c (233B)


      1 /* ISC license. */
      2 
      3 #include <skalibs/uint32.h>
      4 #include <skalibs/fmtscan.h>
      5 
      6 size_t ip4_scanu32 (char const *s, uint32_t *ip)
      7 {
      8   char pack[4] ;
      9   size_t r = ip4_scan(s, pack) ;
     10   if (r) uint32_unpack_big(pack, ip) ;
     11   return r ;
     12 }