]>
Commit | Line | Data |
---|---|---|
fe4da5cc | 1 | /* |
2 | * $Id$ | |
3 | * | |
4 | * $Log$ | |
88cb7938 | 5 | * Revision 1.2.4.1 2002/11/26 16:46:57 hristov |
6 | * Merging NewIO with v3-09-04 | |
7 | * | |
8 | * Revision 1.2 2002/10/14 14:57:10 hristov | |
9 | * Merging the VirtualMC branch to the main development branch (HEAD) | |
10 | * | |
b9d0a01d | 11 | * Revision 1.1.2.1 2002/07/11 17:15:24 alibrary |
12 | * Adding MICROCERN | |
13 | * | |
14 | * Revision 1.1.1.1 1999/05/18 15:55:29 fca | |
15 | * AliRoot sources | |
16 | * | |
fe4da5cc | 17 | * Revision 1.1.1.1 1996/02/15 17:49:40 mclareni |
18 | * Kernlib | |
19 | * | |
20 | */ | |
21 | #include "kerngen/pilot.h" | |
22 | /*> ROUTINE FCHPUT | |
23 | CERN PROGLIB# FCHPUT .VERSION KERNFOR 4.31 911111 | |
24 | ORIG. 22/02/91, JZ | |
25 | ||
26 | Copy a zero-terminated C character string | |
27 | to a Fortran character string of length NTEXT, | |
28 | return length and blank-fill | |
29 | */ | |
30 | #include <stdio.h> | |
31 | #include "kerngen/fortchar.h" | |
32 | int fchput(pttext,ftext,lgtext) | |
33 | char *pttext; | |
34 | #if defined(CERNLIB_QMCRY) | |
35 | _fcd ftext; | |
36 | #endif | |
37 | #if !defined(CERNLIB_QMCRY) | |
38 | char *ftext; | |
39 | #endif | |
40 | int lgtext; | |
41 | { | |
42 | char *utext; | |
43 | int limit, jcol; | |
44 | int nhave; | |
45 | ||
46 | limit = lgtext; | |
47 | jcol = 0; | |
48 | #if defined(CERNLIB_QMCRY) | |
49 | utext = _fcdtocp(ftext); | |
50 | #endif | |
51 | #if !defined(CERNLIB_QMCRY) | |
52 | utext = ftext; | |
53 | #endif | |
54 | if (pttext == NULL) goto out; | |
55 | ||
56 | /*-- copy the text to the caller */ | |
57 | for (jcol = 0; jcol < limit; jcol++) | |
58 | { if (*pttext == '\0') break; | |
59 | *utext++ = *pttext++; | |
60 | } | |
61 | ||
62 | out: nhave = jcol; | |
63 | for (; jcol < limit; jcol++) *utext++ = ' '; | |
64 | return nhave; | |
65 | } | |
66 | /*> END <----------------------------------------------------------*/ |