From e5dfb045b994e1ab8fef9ef5d3f02ce20ea6b685 Mon Sep 17 00:00:00 2001 From: Ryan Kavanagh Date: Mon, 13 Dec 2021 16:55:42 -0500 Subject: many more renames --- .../codesnippets/print_int_array.c.noindent | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 dot_vim/c-support/codesnippets/print_int_array.c.noindent (limited to 'dot_vim/c-support/codesnippets/print_int_array.c.noindent') diff --git a/dot_vim/c-support/codesnippets/print_int_array.c.noindent b/dot_vim/c-support/codesnippets/print_int_array.c.noindent new file mode 100644 index 0000000..02d53c0 --- /dev/null +++ b/dot_vim/c-support/codesnippets/print_int_array.c.noindent @@ -0,0 +1,30 @@ + +/* + * === FUNCTION ====================================================================== + * Name: print_int_array + * Description: Print an int-array with one dimension. + * Use + * print_int_array( *matrix, n1*n2, n2, "matrix" ); + * for + * int matrix[n1][n2]; + * ===================================================================================== + */ +static void +print_int_array ( int array[], /* array to print */ + int n, /* number of elements to print */ + int nrow, /* number of elements per row */ + char *arrayname /* array name */ + ) +{ + int i; + printf ("\n\n array \"%s\", length %d\n", arrayname, n ); + for ( i=0; i