| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: console.c,v 1.9 2009/03/14 21:04:04 dsl Exp $ */ | | 1 | /* $NetBSD: console.c,v 1.10 2009/03/17 00:13:43 he Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 1996 The NetBSD Foundation, Inc. | | 4 | * Copyright (c) 1996 The NetBSD Foundation, Inc. |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * This code is derived from software contributed to The NetBSD Foundation | | 7 | * This code is derived from software contributed to The NetBSD Foundation |
8 | * by Ignatios Souvatzis. | | 8 | * by Ignatios Souvatzis. |
9 | * | | 9 | * |
10 | * Redistribution and use in source and binary forms, with or without | | 10 | * Redistribution and use in source and binary forms, with or without |
11 | * modification, are permitted provided that the following conditions | | 11 | * modification, are permitted provided that the following conditions |
12 | * are met: | | 12 | * are met: |
13 | * 1. Redistributions of source code must retain the above copyright | | 13 | * 1. Redistributions of source code must retain the above copyright |
14 | * notice, this list of conditions and the following disclaimer. | | 14 | * notice, this list of conditions and the following disclaimer. |
| @@ -165,27 +165,27 @@ consclose() | | | @@ -165,27 +165,27 @@ consclose() |
165 | if (mc->w) | | 165 | if (mc->w) |
166 | CloseWindow(mc->w); | | 166 | CloseWindow(mc->w); |
167 | | | 167 | |
168 | if (mc->s) | | 168 | if (mc->s) |
169 | CloseScreen(mc->s); | | 169 | CloseScreen(mc->s); |
170 | if (IntuitionBase) | | 170 | if (IntuitionBase) |
171 | CloseLibrary(IntuitionBase); | | 171 | CloseLibrary(IntuitionBase); |
172 | ConsoleBase = NULL; | | 172 | ConsoleBase = NULL; |
173 | return 0; | | 173 | return 0; |
174 | } | | 174 | } |
175 | #endif | | 175 | #endif |
176 | | | 176 | |
177 | void | | 177 | void |
178 | putchar(char c) | | 178 | putchar(int c) |
179 | { | | 179 | { |
180 | struct Console *mc = ConsoleBase; | | 180 | struct Console *mc = ConsoleBase; |
181 | | | 181 | |
182 | mc->cnior->length = 1; | | 182 | mc->cnior->length = 1; |
183 | mc->cnior->buf = &c; | | 183 | mc->cnior->buf = &c; |
184 | mc->cnior->cmd = Cmd_Wr; | | 184 | mc->cnior->cmd = Cmd_Wr; |
185 | (void)DoIO(mc->cnior); | | 185 | (void)DoIO(mc->cnior); |
186 | } | | 186 | } |
187 | | | 187 | |
188 | void | | 188 | void |
189 | puts(char *s) | | 189 | puts(char *s) |
190 | { | | 190 | { |
191 | struct Console *mc = ConsoleBase; | | 191 | struct Console *mc = ConsoleBase; |