]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/base/legacy_coding.c
ncurses 5.7 - patch 20100717
[ncurses.git] / ncurses / base / legacy_coding.c
index 1c2f160a605d89bbd576b8d8d15f8c3bb4736fcb..d8c80208c6a90d1ec8ce3c4f59829c4b0258567e 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 2005 Free Software Foundation, Inc.                        *
+ * Copyright (c) 2005,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            *
  ****************************************************************************/
 
 /****************************************************************************
- *  Author: Thomas E. Dickey                                                *
+ *  Author: Thomas E. Dickey          2005                                  *
+ *          Juergen Pfeifer           2009                                  *
  ****************************************************************************/
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: legacy_coding.c,v 1.2 2005/12/17 23:38:17 tom Exp $")
+MODULE_ID("$Id: legacy_coding.c,v 1.5 2009/10/24 22:15:00 tom Exp $")
 
 NCURSES_EXPORT(int)
-use_legacy_coding(int level)
+NCURSES_SP_NAME(use_legacy_coding) (NCURSES_SP_DCLx int level)
 {
     int result = ERR;
 
-    T((T_CALLED("use_legacy_coding(%d)"), level));
-    if (level >= 0 && level <= 2 && SP != 0) {
-       result = SP->_legacy_coding;
-       SP->_legacy_coding = level;
+    T((T_CALLED("use_legacy_coding(%p,%d)"), (void *) SP_PARM, level));
+    if (level >= 0 && level <= 2 && SP_PARM != 0) {
+       result = SP_PARM->_legacy_coding;
+       SP_PARM->_legacy_coding = level;
     }
     returnCode(result);
 }
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+use_legacy_coding(int level)
+{
+    return NCURSES_SP_NAME(use_legacy_coding) (CURRENT_SCREEN, level);
+}
+#endif