'\" t .\" Title: get_option .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: January 2017 .\" Manual: Basic Kernel Library Functions .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "GET_OPTION" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "Basic Kernel Library Functions" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" get_option \- Parse integer from an option string .SH "SYNOPSIS" .HP \w'int\ get_option('u .BI "int get_option(char\ **\ " "str" ", int\ *\ " "pint" ");" .SH "ARGUMENTS" .PP \fIstr\fR .RS 4 option string .RE .PP \fIpint\fR .RS 4 (output) integer value parsed from \fIstr\fR .RE .SH "DESCRIPTION" .PP Read an int from an option string; if available accept a subsequent comma as well\&. .PP Return values: 0 \- no int in string 1 \- int found, no subsequent comma 2 \- int found including a subsequent comma 3 \- hyphen found to denote a range .SH "COPYRIGHT" .br