| 1 |
/* netToe Version 1.2.0 |
| 2 |
* Release date: 30 December 2009 |
| 3 |
* Copyright 2000,2001 Gabriele Giorgetti <[email protected]> |
| 4 |
* |
| 5 |
* |
| 6 |
* This program is free software; you can redistribute it and/or modify |
| 7 |
* it under the terms of the GNU General Public License as published by |
| 8 |
* the Free Software Foundation; either version 2 of the License, or |
| 9 |
* (at your option) any later version. |
| 10 |
* |
| 11 |
* This program is distributed in the hope that it will be useful, |
| 12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 |
* GNU General Public License for more details. |
| 15 |
* |
| 16 |
* You should have received a copy of the GNU General Public License |
| 17 |
* along with this program; if not, write to the Free Software |
| 18 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 19 |
*/ |
| 20 |
|
| 21 |
#include <stdio.h> |
| 22 |
|
| 23 |
#include "matrices.h" |
| 24 |
|
| 25 |
|
| 26 |
/* functions set not used yet in nettoe */ |
| 27 |
|
| 28 |
void nettoe_init_matrix_3x3 (MATRIX_3x3 matrix) |
| 29 |
{ |
| 30 |
int c, r; |
| 31 |
|
| 32 |
for (r = 0; r < 3; r++) |
| 33 |
{ |
| 34 |
for (c = 0; c < 3; c++) |
| 35 |
{ |
| 36 |
matrix[c][r] = MATRIX_BLANK; |
| 37 |
} |
| 38 |
} |
| 39 |
} |
| 40 |
|
| 41 |
|
| 42 |
int nettoe_set_matrix_3x3 (MATRIX_3x3 matrix, int c, int r, int value) |
| 43 |
{ |
| 44 |
if (matrix[c][r] != MATRIX_BLANK) |
| 45 |
return 1; |
| 46 |
|
| 47 |
matrix[c][r] = value; |
| 48 |
|
| 49 |
return 0; |
| 50 |
} |
| 51 |
|
| 52 |
|
| 53 |
void nettoe_print_matrix_3x3 (MATRIX_3x3 matrix) |
| 54 |
{ |
| 55 |
int c, r; |
| 56 |
|
| 57 |
for (r = 0; r < 3; r++) |
| 58 |
{ |
| 59 |
for (c = 0; c < 3; c++) |
| 60 |
{ |
| 61 |
printf("%d ", matrix[c][r]); |
| 62 |
} |
| 63 |
printf("\n"); |
| 64 |
} |
| 65 |
} |
| 66 |
|
| 67 |
|
| 68 |
/* |
| 69 |
int nettoe_send_matrix_3x3 (MATRIX_3x3 matrix, int socket ) |
| 70 |
{ |
| 71 |
|
| 72 |
|
| 73 |
} |
| 74 |
|
| 75 |
int nettoe_recive_matrix_3x3 (MATRIX_3x3 matrix, int socket ) |
| 76 |
{ |
| 77 |
|
| 78 |
|
| 79 |
} |
| 80 |
*/ |