fchput.c File Reference

#include "kerngen/pilot.h"
#include <stdio.h>
#include "kerngen/fortchar.h"

Go to the source code of this file.

Functions

int fchput (char *pttext, char *ftext, int lgtext)

Function Documentation

int fchput ( char *  pttext,
char *  ftext,
int  lgtext 
)

Definition at line 25 of file fchput.c.

00034 {
00035       char *utext;
00036       int  limit, jcol;
00037       int  nhave;
00038 
00039       limit = lgtext;
00040       jcol  = 0;
00041 #if defined(CERNLIB_QMCRY)
00042       utext = _fcdtocp(ftext);
00043 #endif
00044 #if !defined(CERNLIB_QMCRY)
00045       utext = ftext;
00046 #endif
00047       if (pttext == NULL)          goto out;
00048 
00049 /*--      copy the text to the caller   */
00050       for (jcol = 0; jcol < limit; jcol++)
00051       {   if (*pttext == '\0')  break;
00052           *utext++ = *pttext++;
00053         }
00054 
00055 out:  nhave = jcol;
00056       for (; jcol < limit; jcol++)   *utext++ = ' ';
00057       return nhave;
00058 }


Generated on 19 Jan 2018 for loon by  doxygen 1.6.1