repo.or.cz
/
netbsd-mini2440.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Sync usage with man page.
[netbsd-mini2440.git]
/
gnu
/
dist
/
gdb6
/
gdb
/
testsuite
/
gdb.base
/
interrupt.c
blob
a895d4b7d814adaa868b5f3211fdee1375302602
1
#include <errno.h>
2
#include <stdio.h>
3
#include <unistd.h>
4
#include <stdlib.h>
5
int
6
main
()
7
{
8
char
x
;
9
int
nbytes
;
10
#ifdef usestubs
11
set_debug_traps
();
12
breakpoint
();
13
#endif
14
printf
(
"talk to me baby
\n
"
);
15
while
(
1
)
16
{
17
nbytes
=
read
(
0
, &
x
,
1
);
18
if
(
nbytes
<
0
)
19
{
20
#ifdef EINTR
21
if
(
errno
!=
EINTR
)
22
#endif
23
perror
(
""
);
24
}
25
else if
(
nbytes
==
0
)
26
{
27
printf
(
"end of file
\n
"
);
28
exit
(
0
);
29
}
30
else
31
write
(
1
, &
x
,
1
);
32
}
33
return
0
;
34
}
35
36
int
37
func1
()
38
{
39
return
4
;
40
}