FreeBASIC
0.91.0
Main Page
Data Structures
Files
File List
Globals
dev_lpt_close.c
Go to the documentation of this file.
1
/* LPTx device */
2
3
#include "
fb.h
"
4
5
int
fb_DevLptClose
(
FB_FILE
*
handle
)
6
{
7
int
res;
8
DEV_LPT_INFO
*devInfo;
9
10
FB_LOCK
();
11
12
devInfo = (
DEV_LPT_INFO
*) handle->
opaque
;
13
if
( devInfo->
uiRefCount
==1 ) {
14
15
res =
fb_PrinterClose
( devInfo );
16
17
if
( res==
FB_RTERROR_OK
) {
18
free(devInfo->
pszDevice
);
19
free(devInfo);
20
}
21
22
}
else
{
23
--devInfo->
uiRefCount
;
24
res =
fb_ErrorSetNum
(
FB_RTERROR_OK
);
25
}
26
27
FB_UNLOCK
();
28
29
return
res;
30
}
rtlib
dev_lpt_close.c
Generated on Thu Jan 23 2014 19:40:08 for FreeBASIC by
1.8.4