root/src/stos.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. stos
  2. stos_inv

   1 /* ---------------------------------------------------------------- */
   2 /* ---------------------------------------------------------------- */
   3 
   4 
   5 #include <unistd.h>
   6 #include <stdio.h>
   7 #include <math.h>
   8 #include <stdlib.h>
   9 #include <pthread.h>
  10 #include "CalculiX.h"
  11 
  12 #include "readfrd.h"
  13 
  14 
  15 /* liefert puffer aus string von position a bis b */
  16 void stos(char *string, ITG a, ITG b, char *puffer)
  17 {
  18   register ITG n, i;
  19 
  20   n=-1;
  21   for (i=a-1; i<b; i++)
  22     {
  23     n++;
  24     if ((i>=MAX_LINE_LENGTH)||(n>=MAX_LINE_LENGTH)) break;
  25     puffer[n] = string[i];
  26   }
  27   puffer[n+1] = '\0';
  28 }
  29 
  30 /* schreibt string in puffer von position a bis b */
  31 void stos_inv(char *string, ITG a, ITG b, char *puffer)
  32 {
  33   register ITG n, i;
  34 
  35   n=-1;
  36   for (i=a-1; i<b; i++)
  37     {
  38     n++;
  39     if ((i>132)||(n>132)) break;
  40     puffer[i] = string[n];
  41   }
  42 }
  43 

/* [<][>][^][v][top][bottom][index][help] */