forked from Imagelibrary/binutils-gdb
import gdb-1999-06-28 snapshot
This commit is contained in:
15
gdb/testsuite/gdb.base/sum.c
Normal file
15
gdb/testsuite/gdb.base/sum.c
Normal file
@@ -0,0 +1,15 @@
|
||||
/* This is a sample program for the HP/DDE debugger. */
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef PROTOTYPES
|
||||
int sum(int *list, int low, int high)
|
||||
#else
|
||||
int sum(list, low, high)
|
||||
int *list, low, high;
|
||||
#endif
|
||||
{
|
||||
int i = 0, s = 0;
|
||||
for (i = low; i <= high; i++)
|
||||
s += list[i];
|
||||
return(s);
|
||||
}
|
||||
Reference in New Issue
Block a user