DOKK / manpages / debian 12 / libmawk1 / libmawk_set_cell.3libmawk.en
LIBMAWK_SET_CELL(3libmawk) libmawk manual LIBMAWK_SET_CELL(3libmawk)

libmawk_set_cell - set the value of a mawk cell.

#include <libmawk.h>

CELL *libmawk_set_cell(mawk_state_t *m, CELL *cell, const charargtype,...);

CELL *libmawk_set_cellp(mawk_state_t *m, CELL *cell, const charargtype, void *argp);

The libmawk_set_cell() function modifies the value of a mawk cell (variable). Argumetn argtype is a format character that describes the type of the payload (accessed trough vararg).

The libmawk_set_cellp() function performs the same action but accepts a generic pointer to the payload.

Format character is one of the followings:


'd' for int payload

'f' for double payload

's' for (zero terminated) char * payload.

Argument m is a libmawk context previously returned by libmawk_initialize() or libmawk_initialize_stage3().

A pointer to the cell modified.

libmawk_initialize_stage(3libmawk), libmawk_initialize(3libmawk), libmawk_get_var(3libmawk).

2009-08-10 libmawk