File: mips.ed

package info (click to toggle)
sam 4.3-14
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,456 kB
  • ctags: 1,673
  • sloc: ansic: 14,328; sh: 1,307; makefile: 315
file content (68 lines) | stat: -rw-r--r-- 999 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/bin/sh

echo "patching sam/unix.c"
ed sam/unix.c << EOF
/^dprint/,$ c
dprint(char *fmt, int va_alist)
va_dcl
{
	va_list args;
	char buf[BLOCKSIZE];

	va_start(args);
	vsprintf(buf, fmt, args);
	termwrite(buf);
	va_end(args);
}
.
w
q
EOF
echo "patching libframe/misc.c"
ed libframe/misc.c << EOF
/^fprint/,/^}/c
fprint(int fd, char *fmt, int va_alist)
va_dcl
{
	va_list args;
	char buf[2048];			/* pick reasonable blocksize */

	va_start(args);
	vsprintf(buf, fmt, args);
	write(fd, buf, strlen(buf));
	va_end(args);
}
.
w
q
EOF
echo "patching samterm/flayer.h"
ed samterm/flayer.h << EOF
/	Rune.*\*(\*textfn/s/ulong/unsigned long/
w
q
EOF
echo "patching sam/parse.h"
ed sam/parse.h << EOF
/	int.*(\*fn)/s/Cmd/struct Cmd/
w
q
EOF
echo "patching sam/sam.h"
ed sam/sam.h << EOF
/dprint/s/(.*)/()/
w
q
EOF
echo "patching include/libc.h"
ed include/libc.h << EOF
/fprint/s/(.*)/()/
w
q
EOF
echo "patching samterm/samterm.h"
ed samterm/samterm.h << EOF
/^Rune.*\*gettext/s/ulong/unsigned long/
w
q
EOF