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

# wncinf(3)

information about cstream

## NAME

wn\_cstream\_filename, wn\_set\_cstream\_filename, wn\_column\_of\_mark, wn\_column\_of\_current\_mark, wn\_linenum\_of\_mark, wn\_linenum\_of\_current\_mark - information about cstream

## SYNOPSIS

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

char *wn_cstream_filename(stream)
wn_cstream stream;

wn_set_cstream_filename(stream,name)
wn_cstream stream;
char name[];

int wn_column_of_mark(stream,mark)
wn_cstream stream;
int mark;

int wn_column_of_current_mark(stream)
wn_cstream stream;

int wn_linenum_of_mark(stream,mark)
wn_cstream stream;
int mark;

int wn_linenum_of_current_mark(stream)
wn_cstream stream;
```

## DESCRIPTION

These routines set and get various information about the cstream *stream*.  This information can be used to make helpful error messages if a parse fails.

**wn\_cstream\_filename** returns the filename for *stream* previously set by **wn\_set\_cstream\_filename**.  The default is **NULL**.

**wn\_column\_of\_mark** returns the number of chars between the closest previous linefeed and *mark*.  A linefeed is assumed to exist at beginning of *stream* (*mark* = -1).

**wn\_column\_of\_current\_mark** returns the number of chars between the  closest previous linefeed and the current *mark*.  A linefeed is  assumed to exist at beginning of *stream* (*mark* = -1).

**wn\_linenum\_of\_mark** returns the number of linefeeds between *mark* and beginning of *stream*.  Line numbers start at 1.

**wn\_linenum\_of\_current\_mark** returns the number of linefeeds  between the current *mark* and beginning of *stream*.  Line numbers start at 1.

## SEE ALSO

wncstr

## AUTHOR

Will Naylor
