1
#include "../stack-c.h"
5
int sz[3],nz,nf,retval;
18
C2F(structcreate)(&Top, &nz, sz, &nf, fnames, &retval);
23
#define memused(it,mn) ((((mn)*( it % 10))/sizeof(int))+1)
25
#include "../stack-c.h"
26
/* Table of constant values */
28
static integer c17 = 17;
29
static integer c1 = 1;
30
static integer c4 = 4;
32
int C2F(structcreate)(lw, nz, sz, nf, fnames,retval)
33
integer *lw, *nz, *sz, *nf, *retval;
39
static integer l0, n1, il;
44
C2F(intersci).ntypes[*lw -Top + Rhs - 1] = '$';
45
C2F(intersci).iwhere[*lw -Top + Rhs - 1] = *lstk(*lw);
48
Scierror(998,"Too many arguments in the stack edit stack.h and enlarge intersiz\r\n");
51
/* size of first entry of the mlist (type) */
52
structtyp(&n1, "size");
56
/* create the mlist header */
58
Err = sadr(il+6) + n1 - *lstk(Bot);
67
/* set mlist type entry */
69
structtyp(istk(iadr(l)), "set");
70
*istk(il + 3) = *istk(il + 2) + n1;
72
/* set dims entry (int32 matrix) */
73
if (!C2F(creimati)("structcreate", &l, &c4, nz, &c1, &lr, &c1, 12L)) return 1;
74
C2F(icopy)(nz,sz,&c1,istk(lr),&c1);
75
n1 = sadr(iadr(l)+4) + memused(c4,*nz) - l;
76
*istk(il + 4) = *istk(il + 3) + n1;
78
/* set fields names entry (vector of strings)*/
79
if (!cre_smat_from_str_i("structcreate", &l, nf, &c1, fnames, 12L ,&next)) return 1;
81
*istk(il + 5) = *istk(il + 4) + n1;
83
/* set struct fields (empty lists)*/
86
creemptylist(&l,&next);
89
*istk(il + 6 + k) = *istk(il + 5 + k) + n1;
95
int creemptylist(slw,lw)
108
int structtyp(ivt, job)
113
/* Local variables */
116
/* definition of first field of tlist's type: struct */
117
/* tlist fields are: */
122
/* Parameter adjustments */
125
if (strcmp(job, "size") == 0) {
126
/* size of the data structure */
128
} else if (strcmp(job, "nchar") == 0) {
129
/* number of chars defining the type field */
131
} else if (strcmp(job, "nfield") == 0) {
132
/* number of fields in the tlist */
134
} else if (strcmp(job, "ptr") == 0) {
135
/* pointers on individual strings */
141
/* Character string Variable header */
148
/* entry (1,1) = "struct" */
157
/* entry (2,1) = "dims" */
164
/* entry (3,1) = "fields" */