/*
 * Description: Map uppercase Finnish special chars to end of
 *              upper case ASCII alphabet
 * Usage: mapfi
 * Copyright: Daniel Tisza, 2010
 * All rights reserved
 */

#include <stdio.h>
#include <stdlib.h>

int main(int argc, char* argv[])
{
  int c;

  if (argc != 1) /* validate argument count */
  {
    return 0;
  }
  
  while ( (c = getchar()) != EOF) /* for all input characters */
  {
    if (c == 0xC5) /* capital a with ball */
    {
      c = 0x5B;
    }
    else if (c == 0xC4) /* capital a with double dots */
    {
      c = 0x5C;
    }
    else if (c == 0xD6) /* capital o with double dots */
    {
      c = 0x5D;
    }

    printf("%c", c);
  }
}

