]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/widechar/lib_in_wch.c
ncurses 5.9 - patch 20130302
[ncurses.git] / ncurses / widechar / lib_in_wch.c
index 5e110cb63548a666513df40347ff114e9712380b..b2396508ba2516dc6f7a099496364c36112125da 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 2002 Free Software Foundation, Inc.                        *
+ * Copyright (c) 2002-2006,2009 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -27,7 +27,7 @@
  ****************************************************************************/
 
 /****************************************************************************
- * Author: Thomas Dickey 2002                                               *
+ * Author: Thomas Dickey                                                    *
  ****************************************************************************/
 
 /*
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_in_wch.c,v 1.2 2002/08/03 20:23:29 tom Exp $")
+MODULE_ID("$Id: lib_in_wch.c,v 1.5 2009/10/24 22:37:55 tom Exp $")
 
 NCURSES_EXPORT(int)
-win_wch(WINDOW *win, cchar_t * wcval)
+win_wch(WINDOW *win, cchar_t *wcval)
 {
     int row, col;
     int code = OK;
 
-    TR(TRACE_CCALLS, (T_CALLED("win_wch(%p,%p)"), win, wcval));
+    TR(TRACE_CCALLS, (T_CALLED("win_wch(%p,%p)"), (void *) win, (void *) wcval));
     if (win != 0
        && wcval != 0) {
        getyx(win, row, col);
 
        *wcval = win->_line[row].text[col];
+       TR(TRACE_CCALLS, ("data %s", _tracecchar_t(wcval)));
     } else {
        code = ERR;
     }
-    returnCode(code);
+    TR(TRACE_CCALLS, (T_RETURN("%d"), code));
+    return (code);
 }