ncurses 5.6 - patch 20070602
[ncurses.git] / ncurses / base / version.c
index 74d46ae9efa4214e57453baba2ddf2d96bb7d2da..ef83967d46b3a2950f757bb1cd415fc3a876f099 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
 /****************************************************************************
- * Copyright (c) 1999 Free Software Foundation, Inc.                        *
+ * Copyright (c) 1999-2004,2005 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            *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
 
 #include <curses.priv.h>
 
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: version.c,v 1.1 1999/10/23 13:28:49 tom Exp $")
+MODULE_ID("$Id: version.c,v 1.6 2005/01/02 01:23:54 tom Exp $")
 
 
-const char *
+NCURSES_EXPORT(const char *)
 curses_version(void)
 {
 curses_version(void)
 {
-    static char my_version[80];
-
     T((T_CALLED("curses_version()")));
     T((T_CALLED("curses_version()")));
-    sprintf(my_version, "ncurses %d.%d.%d",
-       NCURSES_VERSION_MAJOR,
-       NCURSES_VERSION_MINOR,
-       NCURSES_VERSION_PATCH);
-    returnPtr(my_version);
+    returnCPtr("ncurses " NCURSES_VERSION_STRING);
 }
 }