'\" t .\" Title: ieee1284_ref .\" Author: Tim Waugh .\" Generator: DocBook XSL Stylesheets vsnapshot .\" Date: 04/07/2024 .\" Manual: Functions .\" Source: [FIXME: source] .\" Language: English .\" .TH "IEEE1284_REF" "3" "04/07/2024" "[FIXME: source]" "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" ieee1284_ref, ieee1284_unref \- modify a port\*(Aqs reference count .SH "SYNOPSIS" .sp .ft B .nf #include .fi .ft .HP \w'int\ ieee1284_ref('u .BI "int ieee1284_ref(struct\ parport\ *" "port" ");" .HP \w'int\ ieee1284_unref('u .BI "int ieee1284_unref(struct\ parport\ *" "port" ");" .SH "DESCRIPTION" .PP If you want to free the port list from \fBieee1284_find_ports\fR but open one of the ports later on, you will need to prevent it from being destroyed in \fBieee1284_free_ports\fR\&. Each port has a reference count, and you can use \fBieee1284_ref\fR to increment it and \fBieee1284_unref\fR to decrement it\&. .PP If you use \fBieee1284_ref\fR at any stage, you must later call \fBieee1284_unref\fR to relinquish the extra reference\&. If you do not do this, the resources associated with the port will not be cleaned up\&. .PP If you have not previously used \fBieee1284_ref\fR on a port, you must not use \fBieee1284_unref\fR on it\&. .SH "RETURN VALUE" .PP These functions return the number of references held after the increment or decrement\&. .SH "SEE ALSO" .PP \fBieee1284_open\fR(3) .SH "AUTHOR" .PP \fBTim Waugh\fR <\&twaugh@redhat.com\&> .RS 4 Author. .RE .SH "COPYRIGHT" .br Copyright \(co 2001-2003 Tim Waugh .br