| Revision | 7 (tree) |
|---|---|
| Time | 2013-03-17 08:31:52 |
| Author | y-moriguchi |
command
| @@ -0,0 +1,65 @@ | ||
| 1 | +/* | |
| 2 | + * Copyright 2013 Yuichiro Moriguchi | |
| 3 | + * | |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); | |
| 5 | + * you may not use this file except in compliance with the License. | |
| 6 | + * You may obtain a copy of the License at | |
| 7 | + * | |
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 | |
| 9 | + * | |
| 10 | + * Unless required by applicable law or agreed to in writing, software | |
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, | |
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| 13 | + * See the License for the specific language governing permissions and | |
| 14 | + * limitations under the License. | |
| 15 | + */ | |
| 16 | +/* | |
| 17 | + * Copyright 2009-2010 Yuichiro Moriguchi | |
| 18 | + * | |
| 19 | + * Licensed under the Apache License, Version 2.0 (the "License"); | |
| 20 | + * you may not use this file except in compliance with the License. | |
| 21 | + * You may obtain a copy of the License at | |
| 22 | + * | |
| 23 | + * http://www.apache.org/licenses/LICENSE-2.0 | |
| 24 | + * | |
| 25 | + * Unless required by applicable law or agreed to in writing, software | |
| 26 | + * distributed under the License is distributed on an "AS IS" BASIS, | |
| 27 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| 28 | + * See the License for the specific language governing permissions and | |
| 29 | + * limitations under the License. | |
| 30 | + */ | |
| 31 | +package net.morilib.c.pre; | |
| 32 | + | |
| 33 | +import java.io.IOException; | |
| 34 | +import java.io.InputStreamReader; | |
| 35 | + | |
| 36 | +/** | |
| 37 | + * | |
| 38 | + * | |
| 39 | + * @author MORIGUCHI, Yuichiro 2013/03/17 | |
| 40 | + */ | |
| 41 | +public final class CPreprocessor { | |
| 42 | + | |
| 43 | + /** | |
| 44 | + * | |
| 45 | + * @param args | |
| 46 | + * @throws IOException | |
| 47 | + */ | |
| 48 | + public static void main(String[] args) throws IOException { | |
| 49 | + CPreprocessorReader rd = null; | |
| 50 | + String s; | |
| 51 | + | |
| 52 | + try { | |
| 53 | + rd = new CPreprocessorReader( | |
| 54 | + "<stdin>", | |
| 55 | + new InputStreamReader(System.in)); | |
| 56 | + while((s = rd.readLine()) != null) { | |
| 57 | + System.out.println(s); | |
| 58 | + } | |
| 59 | + System.exit(0); | |
| 60 | + } finally { | |
| 61 | + if(rd != null) rd.close(); | |
| 62 | + } | |
| 63 | + } | |
| 64 | + | |
| 65 | +} |