---
name: "libmawk_run_main"
section: "3libmawk"
platform: "linux"
package: "libmawk1t64"
version: "1.0.4-4"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/libmawk_run_main"
---

# libmawk\_run\_main(3libmawk)

run main parts of a script

## NAME

libmawk\_run\_main - run main parts of a script

## SYNOPSIS

```
#include <libmawk.h>

void libmawk_run_main(mawk_state_t *m);
```

## DESCRIPTION

The **libmawk\_run\_main**() attempts to take and parse the next input record and runs all main parts of the script that matches. If there are multiple full records in the input buffer, the process repeats until the buffer becomes empty or contains a partial record. If there is no full record in the buffer, the call returns with nothing done. The call itself never blocks, but the script may. The input buffer may be filled using the libmawk\_append\_input() call.

Argument m is a libmawk context previously returned by libmawk\_initialize() or libmawk\_initialize\_stage3().

## SEE ALSO

**libmawk\_initialize\_stage**(3libmawk), **libmawk\_initialize**(3libmawk), **libmawk\_append\_input**(3libmawk),
