* Copyright (c) 1983 Regents of the University of California.
* Redistribution and use in source and binary forms are permitted
* provided that the above copyright notice and this paragraph are
* duplicated in all such forms and that any documentation,
* advertising materials, and other materials related to such
* distribution and use acknowledge that the software was developed
* by the University of California, Berkeley. The name of the
* University may not be used to endorse or promote products derived
* from this software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
"@(#) Copyright (c) 1983 Regents of the University of California.\n\
static char sccsid
[] = "@(#)railmag.c 5.3 (Berkeley) %G%";
* tell vcat which fonts are loaded on the "typesetter"
#define MAGIC_NUMBER 0436
#define RAILMAG_FILE "/usr/lib/vfont/railmag"
if (fnum
< 1 || fnum
> 4)
error("Invalid font number");
rm
[fnum
-1] = concat(cbuf
[fnum
-1], "/usr/lib/vfont/", argv
[1]);
write(2, "Railmag: ", 9);
write(2, str
, strlen(str
));
if ((fd
= open(concat(cbuf
, file
, ".10"), 0)) < 0)
if ((fd
= open(concat(cbuf2
, "/usr/lib/vfont/", cbuf
), 0)) < 0)
if (read(fd
, &word
, 2) != 2)
if (word
!= MAGIC_NUMBER
)
error("font has no magic number");
if ((rmfd
= open(RAILMAG_FILE
, 0)) < 0)
error("No railmag file");
for (i
= 0; i
< 4; i
++) {
while (read(rmfd
, &c
, 1) == 1 && c
!= '\n')
printf("%s on %d\n", rm
[i
], i
+1);
if ((rmfd
= creat(RAILMAG_FILE
, 0644)) < 0)
error("cant recreate railmag file");
for (i
= 0; i
< 4; i
++) {
register char *outbuf
, *in1
, *in2
;