#include <string.h>

#include "extern.h"

l_ins(numd)

int numd;

	{
		int n_line = 0,flg = 0;
		fmove(seek_hdr);

		fpw = fopen(temp_fil,"w");
		fp2 = fopen(seek_hdr,"r");

		fgets(fbuff,255,fp2); fputs(fbuff,fpw);
		fgets(fbuff,255,fp2); fputs(fbuff,fpw);

		while(1)
		{
			if ( n_line == numd )
				{ flg = 1;
				  strcpy(ssent,"\n入力してください\n"); rsout();
				  rsin(0);
				  fputs(rsent,fpw);
				  rsent[0] = NULL;
				}
			if ( fgets(fbuff,255,fp2) == NULL )  break;
			fputs(fbuff,fpw);
			n_line++;
		}

		if ( ! flg ) { strcpy(ssent,"\n行番号にあやまりがあります\n");
						rsout();
					}

		fclose(fpw); fclose(fp2);

	return(0);
	}
