Chris Bennett
2016-01-28 18:06:42 UTC
These paths do not exist. Locate vfont brings up nothing
What should be done here?
Fix it or remove it?
I know nothing about troff, so need help from someone who does.
Chris
In lpr/common_source/pathnames.h
#define _PATH_VFONT "/usr/libdata/vfont/"
#define _PATH_VFONTB "/usr/libdata/vfont/B"
#define _PATH_VFONTI "/usr/libdata/vfont/I"
#define _PATH_VFONTR "/usr/libdata/vfont/R"
#define _PATH_VFONTS "/usr/libdata/vfont/S"
---------------------------------------------------
for lpr/lpd/printjob.c
in sub printjob
#define FONTLEN 50
char fonts[4][FONTLEN]; /* fonts for troff */
char ifonts[4][40] = {
_PATH_VFONTR,
_PATH_VFONTI,
_PATH_VFONTB,
_PATH_VFONTS,
};
...
/*
* read the control file for work to do
*
* file format -- first character in the line is a command
* rest of the line is the argument.
* valid commands are:
...
* 1 -- "R font file" for troff
* 2 -- "I font file" for troff
* 3 -- "B font file" for troff
* 4 -- "S font file" for troff
...
while (get_line(cfp))
switch (line[0]) {
...
case '1': /* troff fonts */
case '2':
case '3':
case '4':
if (line[1] != '\0')
strlcpy(fonts[line[0]-'1'], line+1, FONTLEN);
continue;
----------------------------------------
in sub print
switch (format) {
...
case 't': /* print troff output */
case 'n': /* print ditroff output */
case 'd': /* print tex output */
(void)unlink(".railmag");
if ((fo = open(".railmag", O_CREAT|O_WRONLY|O_EXCL, FILMOD)) < 0) {
syslog(LOG_ERR, "%s: cannot create .railmag", printer);
(void)unlink(".railmag");
} else {
for (n = 0; n < 4; n++) {
if (fonts[n][0] != '/')
(void)write(fo, _PATH_VFONT,
sizeof(_PATH_VFONT) - 1);
(void)write(fo, fonts[n], strlen(fonts[n]));
(void)write(fo, "\n", 1);
}
(void)close(fo);
}
prog = (format == 't') ? TF : (format == 'n') ? NF : DF;
av[1] = pxwidth;
av[2] = pxlength;
n = 3;
break;
---------------------------------
What should be done here?
Fix it or remove it?
I know nothing about troff, so need help from someone who does.
Chris
In lpr/common_source/pathnames.h
#define _PATH_VFONT "/usr/libdata/vfont/"
#define _PATH_VFONTB "/usr/libdata/vfont/B"
#define _PATH_VFONTI "/usr/libdata/vfont/I"
#define _PATH_VFONTR "/usr/libdata/vfont/R"
#define _PATH_VFONTS "/usr/libdata/vfont/S"
---------------------------------------------------
for lpr/lpd/printjob.c
in sub printjob
#define FONTLEN 50
char fonts[4][FONTLEN]; /* fonts for troff */
char ifonts[4][40] = {
_PATH_VFONTR,
_PATH_VFONTI,
_PATH_VFONTB,
_PATH_VFONTS,
};
...
/*
* read the control file for work to do
*
* file format -- first character in the line is a command
* rest of the line is the argument.
* valid commands are:
...
* 1 -- "R font file" for troff
* 2 -- "I font file" for troff
* 3 -- "B font file" for troff
* 4 -- "S font file" for troff
...
while (get_line(cfp))
switch (line[0]) {
...
case '1': /* troff fonts */
case '2':
case '3':
case '4':
if (line[1] != '\0')
strlcpy(fonts[line[0]-'1'], line+1, FONTLEN);
continue;
----------------------------------------
in sub print
switch (format) {
...
case 't': /* print troff output */
case 'n': /* print ditroff output */
case 'd': /* print tex output */
(void)unlink(".railmag");
if ((fo = open(".railmag", O_CREAT|O_WRONLY|O_EXCL, FILMOD)) < 0) {
syslog(LOG_ERR, "%s: cannot create .railmag", printer);
(void)unlink(".railmag");
} else {
for (n = 0; n < 4; n++) {
if (fonts[n][0] != '/')
(void)write(fo, _PATH_VFONT,
sizeof(_PATH_VFONT) - 1);
(void)write(fo, fonts[n], strlen(fonts[n]));
(void)write(fo, "\n", 1);
}
(void)close(fo);
}
prog = (format == 't') ? TF : (format == 'n') ? NF : DF;
av[1] = pxwidth;
av[2] = pxlength;
n = 3;
break;
---------------------------------