aboutsummaryrefslogtreecommitdiff
path: root/printutils/parse_prt.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-02-24 18:44:20 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-02-24 18:44:20 +0000
commit4f82bdb050024b3475f5371a0612b1fb0fc4c09f (patch)
treeba0f2f986546c7798553f76c305f052b2b190048 /printutils/parse_prt.c
parent52feee9b1fc996acb9c2857596bc5c2440644525 (diff)
downloadbusybox-4f82bdb050024b3475f5371a0612b1fb0fc4c09f.tar.gz
lpr,lpq: rework by dronnikov AT gmail.com
Diffstat (limited to 'printutils/parse_prt.c')
-rw-r--r--printutils/parse_prt.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/printutils/parse_prt.c b/printutils/parse_prt.c
deleted file mode 100644
index 2de0a9215..000000000
--- a/printutils/parse_prt.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/* vi: set sw=4 ts=4: */
-/*
- * Copyright 2008 Walter Harms (WHarms@bfs.de)
- *
- * Licensed under the GPL v2, see the file LICENSE in this tarball.
- */
-#include "libbb.h"
-#include "lpr.h"
-
-void parse_prt(const char *buf, struct netprint *netprint)
-{
- const char *p;
-
- if (!buf) {
- buf = getenv("PRINTER");
- if (!buf)
- buf = "lp"; /* "...@localhost:515" is implied */
- }
- p = strchrnul(buf, '@');
- netprint->queue = xstrndup(buf, p - buf);
- if (!*p) /* just queue? example: "lpq -Pcopie" */
- p = "localhost";
- netprint->server = xstrdup(p);
-
- netprint->lsa = xhost2sockaddr(netprint->server,
- bb_lookup_port(NULL, "tcp", 515));
-}