/*****  名前ジェネレータ namegen    *****/
/*****  put.c                       *****/



#include <stdio.h>
#include "put.h"


void putstr(char *str,          /* 出力文字列へのポインタ                   */
            FILE *fp            /* 出力ファイルのファイルポインタ           */
            ){

    while (*str != '\0'){
        putc((int)(*str), fp);
        str++;
    }
}

void putint(int num,            /* 出力する非負整数                         */
            FILE *fp            /* 出力ファイルのファイルポインタ           */
            ){

    char            str[255];
    int             i;

    i = 0;
    do {
        str[i++] = num % 10 + '0';
    } while ((num /= 10) > 0);

    for ( ; i >= 0 ; i --){
        putc(str[i],fp);
    }
}


