* Copyright (c) 1983 Regents of the University of California.
* Redistribution and use in source and binary forms are permitted provided
* that: (1) source distributions retain this entire copyright notice and
* comment, and (2) distributions including binaries display the following
* acknowledgement: ``This product includes software developed by the
* University of California, Berkeley and its contributors'' in the
* documentation or other materials provided with the distribution and in
* all advertising materials mentioning features or use of this software.
* Neither the name of the University nor the names of its contributors may
* 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
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
"@(#) Copyright (c) 1983 Regents of the University of California.\n\
static char sccsid
[] = "@(#)railmag.c 5.4 (Berkeley) 6/1/90";
* 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
;