.\"Generated by db2man.xsl. Don't modify this, modify the source. .de Sh \" Subsection .br .if t .Sp .ne 5 .PP \fB\\$1\fR .PP .. .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Ip \" List item .br .ie \\n(.$>=3 .ne \\$3 .el .ne 3 .IP "\\$1" \\$2 .. .TH "IEEE1284_REF" 3 "" "" "" .SH NAME ieee1284_ref, ieee1284_unref \- modify a port's reference count .SH "SYNOPSIS" .ad l .hy 0 #include .sp .HP 18 int\ \fBieee1284_ref\fR\ (struct\ parport\ *\fIport\fR); .HP 20 int\ \fBieee1284_unref\fR\ (struct\ parport\ *\fIport\fR); .ad .hy .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 Tim Waugh .