/*
//
// Copyright (C) 1991 Texas Instruments Incorporated.
//
// Permission is granted to any individual or institution to use, copy, modify,
// and distribute this software, provided that this complete copyright and
// permission notice is maintained, intact, in all copies and supporting
// documentation.
//
// Texas Instruments Incorporated provides this software "as is" without
// express or implied warranty.
//
 * OS/2 doesn't have a touch command, so we gotta write one ...
 */
#include <stdio.h>

void main(argc, argv)
int		argc;
char		**argv;
{
  if (argc > 1) {    
    if (freopen(argv[1], "a", stdin) == NULL) {
      fprintf(stderr,"Can't create %s\n",argv[1]);
      exit(1);
    } else {
      char c = 0;
      if (ftell(stdin) != 0) {
	rewind(stdin);
	c = fgetc(stdin);
	rewind(stdin);
	fputc(c, stdin);
      } else {
	fputc(c, stdin);
	fclose(stdin);
	freopen(argv[1], "w", stdin);
      }
      fclose(stdin);
    }
  }
  exit(0);
}
