* Copyright (c) 1983 Regents of the University of California.
* Redistribution and use in source and binary forms are permitted
* provided that this notice is preserved and that due credit is given
* to the University of California at 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'' without express or implied warranty.
"@(#) Copyright (c) 1983 Regents of the University of California.\n\
static char sccsid
[] = "@(#)railmag.c 5.2 (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
;