summaryrefslogtreecommitdiffstats
path: root/funtools/fitsy/ptest.c
blob: eb844118f35a02d28982375acc254207d16a9159 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <stdio.h>

#define SZ_LINE 256

main(argc, argv)
     int argc;
     char **argv;
{
  char tbuf[SZ_LINE];
  char name[SZ_LINE];
  char extn[SZ_LINE];
  char tail[SZ_LINE];
  int indx;

  while( 1 ){
    *tbuf = '\0';
    if( feof(stdin) )
      break;
    gets(tbuf);
    if( *tbuf == 'q' )
      exit(0);
    if( (*tbuf == '\0') || (*tbuf == '\n') )
      continue;
    ft_parsefilename(tbuf, name, extn, SZ_LINE, &indx, tail, SZ_LINE);
    fprintf(stderr, "%s ->\nname='%s' extn='%s' indx='%d' tail='%s'\n\n",
	    tbuf, name, extn, indx, tail);
  }
}