piglatin.c (7c478bd9) piglatin.c (d29b2c44)
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 *
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
13 *
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 *
20 * CDDL HEADER END
21 */
22/*
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21/*
23 * Copyright 2000, 2002 Sun Microsystems, Inc.
22 * Copyright 2007 Sun Microsystems, Inc.
24 * All rights reserved.
25 * Use is subject to license terms.
26 *
27 * Very crude pig latin converter.
28 * Piglatin is an encoded form of English that is often used by children
29 * as a game. A piglatin word is formed from an English word by:
30 *
31 * . If the word begins with a consonant, move the consonant to the end of

--- 6 unchanged lines hidden (view full) ---

38
39#include <stdio.h>
40#include <strings.h>
41#include <ctype.h>
42
43int
44main()
45{
23 * All rights reserved.
24 * Use is subject to license terms.
25 *
26 * Very crude pig latin converter.
27 * Piglatin is an encoded form of English that is often used by children
28 * as a game. A piglatin word is formed from an English word by:
29 *
30 * . If the word begins with a consonant, move the consonant to the end of

--- 6 unchanged lines hidden (view full) ---

37
38#include <stdio.h>
39#include <strings.h>
40#include <ctype.h>
41
42int
43main()
44{
46 char buffer[200], * cb, * sb;
45 char buffer[32767], * cb, * sb;
47 int ic, ignore = 0, word = 0;
48
49 sb = cb = &buffer[0];
50 *sb = '\0';
51
52 while ((ic = getc(stdin)) != EOF) {
53 char c = (char)ic;
54

--- 72 unchanged lines hidden ---
46 int ic, ignore = 0, word = 0;
47
48 sb = cb = &buffer[0];
49 *sb = '\0';
50
51 while ((ic = getc(stdin)) != EOF) {
52 char c = (char)ic;
53

--- 72 unchanged lines hidden ---