* Copyright (C) 2005-2009 Novell, Inc. (http://www.novell.com)
* Licensed under the MIT license. See LICENSE file in the project root for full license information.
*/
-#if defined(__native_client__)
-#include "console-null.c"
-#else
-
#include <config.h>
#include <glib.h>
#include <stdio.h>
if (dims == -1){
int cols = 0, rows = 0;
- const char *str = g_getenv ("COLUMNS");
- if (str != NULL)
+ char *str = g_getenv ("COLUMNS");
+ if (str != NULL) {
cols = atoi (str);
+ g_free (str);
+ }
str = g_getenv ("LINES");
- if (str != NULL)
+ if (str != NULL) {
rows = atoi (str);
+ g_free (str);
+ }
if (cols != 0 && rows != 0)
cols_and_lines = (cols << 16) | rows;
return TRUE;
}
-#endif /* #if defined(__native_client__) */
-