---
name: "genders_isnode"
section: "3"
platform: "linux"
package: "libgenders0-dev"
version: "1.27-3-3.1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/genders_isnode"
---

# genders\_isnode(3)

node, attribute, value check routines

## NAME

genders\_isnode, genders\_isattr, genders\_isattrval - node, attribute, value check routines

## SYNOPSIS

**#include \<genders.h\>**

**int genders\_isnode(genders\_t handle, const char \*node);**

**int genders\_isattr(genders\_t handle, const char \*attr);**

**int genders\_isattrval(genders\_t handle, const char \*attr, const char \*val);**\

## DESCRIPTION

**genders\_isnode()** tests if the node pointed to by *node* is listed in the genders file.  If *node* is NULL, the current node is tested.

**genders\_isattr()** tests if the attribute pointed to by *attr* is listed for some node in the genders file.

**genders\_isattrval()** tests if the attribute pointed to by *attr* is equal to the value pointed to by *val* for some node in the genders file.\

## RETURN VALUES

For **genders\_isnode()**, if *node* is listed in the genders file, 1 is returned.  If it is not listed, 0 is returned.

For **genders\_isattr()**, if *attr* is listed in the genders file, 1 is returned.  If it is not listed, 0 is returned.

For **genders\_isattrval()**, if *attr*=*val* is listed in the genders file, 1 is returned.  If it is not listed, 0 is returned.

On error, all three return -1 and an error code is returned in *handle*.  The error code can be retrieved via [**genders\_errnum**(3)](/genders_errnum/3.md) , and a description of the error code can be retrieved via  [**genders\_strerror**(3)](/genders_strerror/3.md). Error codes are defined in genders.h.\

## ERRORS

- **GENDERS\_ERR\_NULLHANDLE**

  The *handle* parameter is NULL.  The genders handle must be created with [**genders\_handle\_create**(3)](/genders_handle_create/3.md).

- **GENDERS\_ERR\_NOTLOADED**

  [**genders\_load\_data**(3)](/genders_load_data/3.md) has not been called to load genders data.

- **GENDERS\_ERR\_PARAMETERS**

  An incorrect parameter has been passed in.

- **GENDERS\_ERR\_MAGIC**

  *handle* has an incorrect magic number.  *handle* does not point to a genders handle or *handle* has been destroyed by [**genders\_handle\_destroy**(3)](/genders_handle_destroy/3.md).\

## FILES

/usr/include/genders.h

## SEE ALSO

[libgenders(3)](/libgenders/3.md), [genders\_handle\_create(3)](/genders_handle_create/3.md), [genders\_load\_data(3)](/genders_load_data/3.md), [genders\_errnum(3)](/genders_errnum/3.md), [genders\_strerror(3)](/genders_strerror/3.md)
