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
/
sum.c
blob
f5a5dbf2631d7c3d34e746ab51042b3d22b5dbb5
1
/* This is a sample program for the HP/DDE debugger. */
2
#include <stdio.h>
3
4
#ifdef PROTOTYPES
5
int
sum
(
int
*
list
,
int
low
,
int
high
)
6
#else
7
int
sum
(
list
,
low
,
high
)
8
int
*
list
,
low
,
high
;
9
#endif
10
{
11
int
i
=
0
,
s
=
0
;
12
for
(
i
=
low
;
i
<=
high
;
i
++)
13
s
+=
list
[
i
];
14
return
(
s
);
15
}