assign(3)

assign3

Assign an integer value, check for truncation

Usage

#include <libowfat/rangecheck.h>

int assign(dest,a);

Overview

If a and dest have the same type, or the value of a is representable in the type of dest, do dest=a and return 0.

Otherwise, return 1.

Note: This is a macro, so dest does not have to be a pointer.

Releases

Unchanged in 2 releases since Debian 12 (Bookworm).

  1. 12–13

Bugs

In the multiplication functions, a return value of 1 signals success and 0 failure. In add_of, sub_of and assign it's the other way around.

From libowfat-dev 0.32-5 in Debian 13 (Trixie). Parsed by carta from the page's man source.