1: /* Fortran string concatenation PLWard 3/20/80 */ 2: char string_(strout,outlen,numargs,params) 3: long outlen; 4: int *numargs; 5: char strout[],params[]; 6: { 7: int i,j,k=0; 8: char **arg; 9: long *lengths; 10: 11: arg = ¶ms; 12: lengths = &arg[*numargs]; 13: 14: for(i=0; i < *numargs ; i++){ 15: for( j=0; j < lengths[i]; j++,k++) 16: if(k < outlen) strout[k] = arg[i][j]; 17: if (lengths[i] > 1) 18: while (strout[k-1] == ' ' || strout[k-1] == '\0') 19: if ( k > 0 ) k--; 20: } 21: strout[k] = '\0'; 22: }