Myecho.c



/***************************************************************************/
/*                                                                         */
/*                                                                         */
/*       A variant of echo that prints quotes around each argument.        */
/* Copyright (c) 1989-1992 by Hamilton Laboratories.  All rights reserved. */
/*                                                                         */
/*                                                                         */
/***************************************************************************/

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "internat.h"

void cdecl main ( int argc, char *argv[] )
      {
      int i, length = 0;
      Internationalize();
      for (i = 0;  i < argc - 1; i++)
         {
         length += strlen(argv[i]) + 1;
         printf ("'%s' ", argv[i]);
         }
      length += strlen(argv[i]) + 1;
      printf("'%s'\n", argv[i]);
      printf("arg length = %d characters\n", length);
      exit(0);
      }



Hamilton C shell | Free Updates | Free Demo Software | Win32 Training
Y2K | Customer Testimonials | On-line Hamilton C shell User Guide
Home | Email | Support | Company Profile | Distributors | Links



Copyright © 1997-2001 by Hamilton Laboratories. All rights reserved.
You are visitor number 390. This page was last modified August 14, 2001.