File: isnull.c

package info (click to toggle)
libuuid-perl 0.37-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,092 kB
  • sloc: ansic: 2,374; perl: 580; makefile: 5
file content (28 lines) | stat: -rw-r--r-- 403 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifdef __cplusplus
extern "C" {
#endif

#include "ulib/isnull.h"

#ifdef __cplusplus
}
#endif

IV uu_isnull_binary(const uu_t in)
{
  const U8  *cp = in;
  IV        i;

  for (i=0; i<sizeof(uu_t); i++)
    if (*cp++)
      return 0;
  return 1;
}

IV uu_isnull_struct(const struct_uu_t *in) {
  if (in->v0.low)  return 0;
  if (in->v0.high) return 0;
  return 1;
}

/* ex:set ts=2 sw=2 itab=spaces: */