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1,1,1,2,1,1,-4,1,-1,-4,1,-1,-4,1,1,1,1,1,1,1,-4,4,4,1,-1,4,-1,4,2,1,1,1,1,1,1,4,1,1,1,4,1,4} },
110 {15,18,0, {1,1,1,1,1,2,1,1,-4,1,-1,-4,1,-1,-4,1,1,1} },
112 {20,19,0, {1,1,1,1,1,-4,4,2,4,2,1,1,1,1,1,2,1,3,2} },
114 {30,5,1, {1,1,1,1,1} },
116 {31,5,1, {1,1,1,1,1} },
119 {40,16,0, {1,1,2,1,1,1,2,1,1,-4,1,-1,-4,1,-1,-4} },
122 {41,19,0, {1,1,2,1,1,1,2,1,1,-4,1,-1,-4,1,-1,-4,1,1,1} },
126 {42,30,1, {1,1,2,1,1,1,2,1,1,-4,1,-1,-4,1,-1,-4,2,1,1,1,1,1,1,4,1,1,1,4,1,4} },
130 {43,33,1, {1,1,2,1,1,1,2,1,1,-4,1,-1,-4,1,-1,-4,1,1,1,2,1,1,1,1,1,1,4,1,1,1,4,1,4} },
135 {1000,9,0, {1,1,1,1,1,2,1,1,-4} },
138 {1001,16,0, {1,1,1,1,1,2,1,1,4,4,1,1,1,4,1,4} },
141 {1002,15,0, {1,1,1,1,1,2,1,1,-4,1,1,1,4,4,2} },
144 {1100,15,0, {1,1,1,1,1,2,1,1,-4,1,-1,-4,1,-1,-4} },
147 {1101,22,0, {1,1,1,1,1,2,1,1,-4,1,-1,-4,1,-1,-4,4,1,1,1,4,1,4} },
149 {32,10,1, {1,1,1,1,1,2,1,1,-2,1} },
152 {44,21,0, {1,1,2,1,-1,-4,-1,-4,1,1,1,2,1,1,-2,1,-1,-4,1,-1,-4} },
156 {45,24,0, {1,1,2,1,-1,-4,-1,-4,1,1,1,2,1,1,-4,1,-1,-4,1,-1,-4,1,1,1} },
160 {46,35,1, {1,1,2,1,-1,-4,-1,-4,1,1,1,2,1,1,-4,1,-1,-4,1,-1,-4,2,1,1,1,1,1,1,4,1,1,1,4,1,4} },
164 {47,38,1, {1,1,1,2,1,-1,-4,-1,-4,1,1,2,1,1,-4,1,-1,-4,1,-1,-4,1,1,1,2,1,1,1,1,1,1,4,1,1,1,4,1,4} },
168 {48,26,0, {1,1,2,1,-1,-4,-1,-4,1,-1,-4,-1,-4,1,1,1,2,1,1,-4,1,-1,-4,1,-1,-4} },
173 {50,21,0, {1,1,1,1,1,2,1,1,-4,1,-1,-4,1,-1,-4,1,1,4,4,4,4} },
178 {52,15,0, {1,1,1,1,1,1,1,1,2,1,1,-4,1,-1,-4} },
182 {51,16,1, {1,1,1,1,1,2,1,1,-4,1,-1,-4,1,-1,-4,1} },
187 {91,36,1, {1,1,1,1,1,2,1,1,-4,1,-1,-4,1,-1,-4,1,1,1,-1,-4,-1,-4,2,1,1,1,1,1,1,4,1,1,1,4,1,4} },
192 {33,18,1, {1,1,1,1,1,2,1,1,-4,1,2,2,2,-1,-4,1,1,1} },
197 {34,32,1, {1,1,1,1,1,2,1,1,-4,1,2,2,2,-1,-4,1,1,1,2,1,1,1,1,1,1,4,1,1,1,4,1,4} },
202 {53,19,1, {1,1,1,1,4,2,1,1,1,2,1,1,-4,1,-1,-4,1,-1,-4} },
207 {54,22,1, {1,1,1,1,4,2,1,1,1,2,1,1,-4,1,-1,-4,1,-1,-4,1,1,1} },
213 {57,7,1, {1,1,2,2,2,2,1} },
218 {60,24,0, {1,1,1,1,1,2,1,1,-4,1,-1,-4,1,-1,-4,1,1,1,2,1,1,1,1,1} },
223 {61,38,1, {1,1,1,1,1,2,1,1,-4,1,-1,-4,1,-1,-4,1,1,1,2,1,1,1,1,1,2,1,1,1,1,1,1,4,1,1,1,4,1,4} },
229 {35,6,1, {1,1,1,1,1,1} }
301 printf(
"getpdstemplate: PDS Template 4.%d not defined.\n", (
int)number);
332 g2int index, i, j, k, l;
345 new->extlen = list[26];
346 new->ext = malloc(
sizeof(
g2int) * new->extlen);
347 for (i = 0; i <
new->extlen; i++)
352 else if (number == 4)
354 new->extlen = list[25];
355 new->ext = malloc(
sizeof(
g2int) * new->extlen);
356 for (i = 0; i <
new->extlen; i++)
361 else if (number == 8)
365 new->extlen = (list[21] - 1) * 6;
366 new->ext = malloc(
sizeof(
g2int) * new->extlen);
367 for (j = 2; j <= list[21]; j++)
370 for (k = 0; k < 6; k++)
372 new->ext[l+k] =
new->map[23 + k];
377 else if (number == 9)
381 new->extlen = (list[28] - 1) * 6;
382 new->ext = malloc(
sizeof(
g2int) * new->extlen);
383 for (j = 2; j <= list[28]; j++)
386 for (k = 0; k < 6; k++)
388 new->ext[l + k] =
new->map[30 + k];
393 else if (number == 10)
397 new->extlen = (list[22] - 1) * 6;
398 new->ext = (
g2int *)malloc(
sizeof(
g2int)*
new->extlen);
399 for (j = 2; j <= list[22]; j++)
402 for (k = 0; k < 6; k++)
404 new->ext[l + k] =
new->map[24 + k];
409 else if (number == 11)
413 new->extlen = (list[24] - 1) * 6;
414 new->ext = malloc(
sizeof(
g2int) * new->extlen);
415 for (j = 2; j <= list[24]; j++)
418 for (k = 0; k < 6; k++)
420 new->ext[l + k] =
new->map[26 + k];
425 else if (number == 12)
429 new->extlen = (list[23] - 1) * 6;
430 new->ext = malloc(
sizeof(
g2int) * new->extlen);
431 for (j = 2; j <= list[23]; j++)
434 for (k = 0; k < 6; k++)
436 new->ext[l + k] =
new->map[25 + k];
441 else if (number == 13)
443 new->extlen = ((list[37] - 1) * 6) + list[26];
444 new->ext = malloc(
sizeof(
g2int) * new->extlen);
447 for (j = 2; j <= list[37]; j++)
450 for (k = 0; k < 6; k++)
452 new->ext[l + k] =
new->map[39 + k];
456 l = (list[37] - 1) * 6;
459 for (i = 0; i < list[26]; i++)
464 else if (number == 14)
466 new->extlen = ((list[36] - 1) * 6) + list[25];
467 new->ext = malloc(
sizeof(
g2int) * new->extlen);
470 for (j = 2; j <= list[36]; j++)
473 for (k = 0; k < 6; k++)
475 new->ext[l + k] =
new->map[38 + k];
479 l = (list[36] - 1) * 6;
482 for (i = 0; i < list[25]; i++)
487 else if (number == 30)
489 new->extlen = list[4] * 5;
490 new->ext = malloc(
sizeof(
g2int) * new->extlen);
491 for (i = 0;i < list[4]; i++)
501 else if (number == 31)
503 new->extlen = list[4] * 5;
504 new->ext = malloc(
sizeof(
g2int) * new->extlen);
505 for (i = 0; i < list[4]; i++)
515 else if (number == 42)
519 new->extlen = (list[22] - 1) * 6;
520 new->ext = malloc(
sizeof(
g2int) * new->extlen);
521 for (j = 2; j <= list[22]; j++)
524 for (k = 0; k < 6; k++)
526 new->ext[l + k] =
new->map[24 + k];
531 else if (number == 43)
535 new->extlen = (list[25] - 1) * 6;
536 new->ext = malloc(
sizeof(
g2int) * new->extlen);
537 for (j = 2; j <= list[25]; j++)
540 for (k = 0; k < 6; k++)
542 new->ext[l + k] =
new->map[27 + k];
547 else if (number == 32)
549 new->extlen = list[9] * 10;
550 new->ext = malloc(
sizeof(
g2int) * new->extlen);
551 for (i = 0; i < list[9]; i++)
557 new->ext[l + 3] = -1;
558 new->ext[l + 4] = -4;
561 else if (number == 46)
565 new->extlen = (list[27] - 1) * 6;
566 new->ext = malloc(
sizeof(
g2int) * new->extlen);
567 for (j = 2; j <= list[27]; j++)
570 for (k = 0; k < 6; k++)
572 new->ext[l + k] =
new->map[29 + k];
577 else if (number == 47)
581 new->extlen = (list[30] - 1) * 6;
582 new->ext = malloc(
sizeof(
g2int) * new->extlen);
583 for (j = 2; j <= list[30]; j++)
586 for (k = 0; k < 6; k++)
588 new->ext[l + k] =
new->map[32 + k];
593 else if (number == 51)
595 new->extlen = list[15]*11;
596 new->ext = malloc(
sizeof(
g2int) * new->extlen);
597 for (i = 0; i < list[15]; i++)
608 else if (number == 33)
610 new->extlen = list[9];
611 new->ext = malloc(
sizeof(
g2int) * new->extlen);
612 for (i = 0; i <
new->extlen; i++)
617 else if (number == 34)
619 new->extlen = ((list[24] - 1) * 6)+list[9];
620 new->ext = malloc(
sizeof(
g2int) * new->extlen);
623 for (j = 2; j <= list[24]; j++)
626 for (k = 0; k < 6; k++)
628 new->ext[l + k] =
new->map[26 + k];
632 l = (list[24] - 1) * 6;
635 for (i = 0; i < list[9]; i++)
640 else if (number == 53)
642 new->extlen = list[3];
643 new->ext = malloc(
sizeof(
g2int) * new->extlen);
644 for (i = 0; i <
new->extlen; i++)
649 else if (number == 54)
651 new->extlen = list[3];
652 new->ext = malloc(
sizeof(
g2int) * new->extlen);
653 for (i = 0;i<
new->extlen;i++)
658 else if (number == 91)
660 new->extlen = ((list[28] - 1) * 6)+list[15];
661 new->ext = malloc(
sizeof(
g2int) * new->extlen);
664 for (j = 2; j <= list[28]; j++)
667 for (k = 0; k < 6; k++)
669 new->ext[l + k] =
new->map[30 + k];
673 l = (list[29] - 1) * 6;
676 for (i = 0; i < list[15]; i++)
682 else if (number == 57)
684 new->extlen = list[6] * 15;
685 new->ext = malloc(
sizeof(
g2int) * new->extlen);
686 for (i = 0; i < list[6]; i++)
707 else if (number == 61)
711 new->extlen = (list[30] - 1) * 6;
712 new->ext = malloc(
sizeof(
g2int) * new->extlen);
713 for (j = 2; j <= list[30]; j++)
716 for (k = 0; k < 6; k++)
718 new->ext[l + k] =
new->map[32 + k];