summaryrefslogtreecommitdiffstats
path: root/usr.bin/doscmd/int17.c
diff options
context:
space:
mode:
authortg <tg@FreeBSD.org>2001-07-24 11:50:23 +0000
committertg <tg@FreeBSD.org>2001-07-24 11:50:23 +0000
commit47c2c99b5115c72bc1c4ad5ba8e7d21169d982ae (patch)
treef69b902c12889e39d57e3d83d55293ee0abee74b /usr.bin/doscmd/int17.c
parent97507091ff20d3dc72113dfbd0c9532423d3acb4 (diff)
downloadFreeBSD-src-47c2c99b5115c72bc1c4ad5ba8e7d21169d982ae.zip
FreeBSD-src-47c2c99b5115c72bc1c4ad5ba8e7d21169d982ae.tar.gz
Clean up the code a bit:
- add $FreeBSD$; - remove unused variables; - add missing headers and prototypes; - -Wshadow.
Diffstat (limited to 'usr.bin/doscmd/int17.c')
-rw-r--r--usr.bin/doscmd/int17.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/doscmd/int17.c b/usr.bin/doscmd/int17.c
index 0cb162b..ee693a8 100644
--- a/usr.bin/doscmd/int17.c
+++ b/usr.bin/doscmd/int17.c
@@ -32,9 +32,13 @@
* $FreeBSD$
*/
-#include "doscmd.h"
+#include <sys/types.h>
+#include <sys/uio.h>
#include <paths.h>
#include <signal.h>
+#include <unistd.h>
+
+#include "doscmd.h"
static int lpt_fd[4] = { -1, -1, -1, -1, };
static FILE *lpt_file[4] = { 0, 0, 0, 0};
@@ -44,17 +48,13 @@ static int timeout[4] = { 30, 30, 30, 30 };
static int last_poll[4] = { 0, 0, 0, 0};
static int last_count[4] = { 0, 0, 0, 0};
static int current_count[4] = { 0, 0, 0, 0};
-static int alarm_active[4] = { 0, 0, 0, 0};
-static int alarm_set = 0;
static void open_printer(int printer);
void
int17(regcontext_t *REGS)
{
- char printer_name[20];
int fd;
- int p;
u_char c;
switch (R_AH) {
@@ -133,7 +133,7 @@ open_printer(int printer)
* if printer is direct then open output device.
*/
if (direct[printer]) {
- if (p = queue[printer]) {
+ if ((p = queue[printer]) != 0) {
if ((fd = open(p, O_WRONLY|O_APPEND|O_CREAT, 0666)) < 0) {
perror(p);
return;
OpenPOWER on IntegriCloud