Subversion Repositories programming

Rev

Rev 86 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 86 Rev 87
Line 1... Line 1...
1
/* arrays.c -- common functions for dealing with arrays */
1
/* arrays.c -- common functions for dealing with arrays
-
 
2
 *
-
 
3
 * Written By: Ira Snyder
-
 
4
 * Started On: 06-02-2005
-
 
5
 *
-
 
6
 * License: MIT License
-
 
7
 * License: http://www.opensource.org/licenses/mit-license.php
-
 
8
 *
-
 
9
 * _DO NOT_ forget to free the arrays you have created!
-
 
10
 */
2
 
11
 
3
#ifndef ARRAYS_C
12
#ifndef ARRAYS_C
4
#define ARRAYS_C
13
#define ARRAYS_C
5
 
14
 
6
#include <stdio.h>  /* for printf() */
15
#include <stdio.h>  /* for printf() */
Line 45... Line 54...
45
    for (i=src_left, j=0; i<=src_right; i++, j++)
54
    for (i=src_left, j=0; i<=src_right; i++, j++)
46
        dst[j] = src[i];
55
        dst[j] = src[i];
47
}
56
}
48
 
57
 
49
/* print out the contents of the array
58
/* print out the contents of the array
50
 * used for debugging mainly
59
 * used for debugging mainly */
51
 */
-
 
52
void printarray (int array[], unsigned long size)
60
void printarray (int array[], unsigned long size)
53
{
61
{
54
    unsigned long i;
62
    unsigned long i;
55
       
63
       
56
    printf("Printing %lu elements\n", size);
64
    printf("Printing %lu elements\n", size);