OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [gdb-5.0/] [gdb/] [testsuite/] [gdb.base/] [sum.c] - Diff between revs 107 and 1765

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 107 Rev 1765
/* This is a sample program for the HP/DDE debugger. */
/* This is a sample program for the HP/DDE debugger. */
#include <stdio.h>
#include <stdio.h>
 
 
#ifdef PROTOTYPES
#ifdef PROTOTYPES
int sum(int *list, int low, int high)
int sum(int *list, int low, int high)
#else
#else
int sum(list, low, high)
int sum(list, low, high)
int *list, low, high;
int *list, low, high;
#endif
#endif
    {
    {
        int i = 0, s = 0;
        int i = 0, s = 0;
        for (i = low; i <= high; i++)
        for (i = low; i <= high; i++)
            s += list[i];
            s += list[i];
        return(s);
        return(s);
    }
    }
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.