---
name: "wneq"
section: "3"
platform: "linux"
package: "libwn-dev"
version: "6.0-17"
release: "Debian 4.0 (Etch)"
platforms: ["linux"]
url: "https://new.carta.tech/wneq"
---

# wneq(3)

functions which determine equality (for hash tables)

## NAME

wn\_streq, wn\_streqnc, wn\_inteq, wn\_ptreq, wn\_ptrNULLeq - functions which determine equality (for hash tables)

## SYNOPSIS

```
#include <wn/wneq.h>

int wn_streq(char s1[],char s2[])

int wn_streqnc(char s1[],char s2[])

int wn_inteq(int i1,int i2)

int wn_ptreq(ptr p1,ptr p2)

int wn_ptrNULLeq(bool &success,ptr p1,ptr p2)
```

## DESCRIPTION

These routines are designed to assist building hash tables (with  the exception of **wn\_streqnc**).  They determine whether their arguments are equal or not, and return **TRUE** if **eq**ual, **FALSE** if not equal.

**wn\_ptrNULLeq** sets *success* to **TRUE** iff *p1* or *p2* is **NULL**. If *p1* and *p2* are **NULL**, it returns **TRUE**.  If *p1* is **NULL** but *p2* is not **NULL**, it returns **FALSE**.  If *p1* is not **NULL** but *p2* is **NULL**, it returns **FALSE**.  This function is useful for constructing complicated linked structure **eq**uality tests where it  is possible for some pointers to be **NULL**.

**wn\_streqnc** ignores case.

## SEE ALSO

wnhtbl "(3), " wncpy (3)

## AUTHOR

Will Naylor
