#include "machine.h"Include dependency graph for gensubst.c:

Go to the source code of this file.
Defines | |
| #define | SUBST(Type) |
Typedefs | |
| typedef signed char | integer1 |
| typedef short | integer2 |
Functions | |
| int C2F() | gensubst (integer *typ, integer *n, int *dx, integer *incx, int *dy, integer *incy) |
| #define SUBST | ( | Type | ) |
Value:
{\
Type *DX;\
Type *DY;\
DX=(Type *)dx;\
--DX;\
DY=(Type *)dy;\
--DY;\
if (*incx == 1 && *incy == 1){\
for (i = 1; i <= i1; ++i) DX[i] = DX[i] - DY[i];\
}\
else {\
ix = 1; iy = 1;\
if (*incx < 0) ix = (-(*n) + 1) * *incx + 1;\
if (*incy < 0) iy = (-(*n) + 1) * *incy + 1;\
for (i = 1; i <= i1; ++i) {\
DX[ix] = DX[ix] - DY[iy];\
ix += *incx; iy += *incy;\
}\
}\
}
Definition at line 6 of file gensubst.c.
Referenced by gensubst().
| typedef signed char integer1 |
Definition at line 2 of file gensubst.c.
| typedef short integer2 |
Definition at line 3 of file gensubst.c.
| int C2F() gensubst | ( | integer * | typ, | |
| integer * | n, | |||
| int * | dx, | |||
| integer * | incx, | |||
| int * | dy, | |||
| integer * | incy | |||
| ) |
Definition at line 29 of file gensubst.c.
References i, i1, ix, n, SUBST, and typ.
00036 { 00037 static integer i, ix, iy, i1; 00038 00039 i1 = *n; 00040 if (i1 <= 0) return 0; 00041 00042 switch (*typ) { 00043 case 1: 00044 SUBST(integer1); 00045 break; 00046 case 2: 00047 SUBST(integer2); 00048 break; 00049 case 4: 00050 SUBST(integer); 00051 break; 00052 case 11: 00053 SUBST(unsigned char); 00054 break; 00055 case 12: 00056 SUBST(unsigned short); 00057 break; 00058 case 14: 00059 SUBST(unsigned int); 00060 break; 00061 } 00062 return 0; 00063 }
1.5.1