remove deep_copy function, rename initncurses to initcurses
git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@169 db0b04b0-f4d1-0310-9a6d-de3e77497b0e
This commit is contained in:
parent
4ca56b17c3
commit
a095001e0a
|
@ -539,7 +539,7 @@ inprogressmenu ()
|
|||
refresh ();
|
||||
endwin ();
|
||||
ttyplay_main (ttyrecname, 1, 0);
|
||||
initncurses ();
|
||||
initcurses ();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -748,11 +748,14 @@ freefile ()
|
|||
/* free existing mem, clear existing entries */
|
||||
for (i = 0; i < f_num; i++)
|
||||
{
|
||||
free (users[i]->password);
|
||||
free (users[i]->username);
|
||||
free (users[i]->email);
|
||||
free (users[i]->env);
|
||||
free (users[i]);
|
||||
if (users[i] != me)
|
||||
{
|
||||
free (users[i]->password);
|
||||
free (users[i]->username);
|
||||
free (users[i]->email);
|
||||
free (users[i]->env);
|
||||
free (users[i]);
|
||||
}
|
||||
}
|
||||
|
||||
if (users)
|
||||
|
@ -765,7 +768,7 @@ freefile ()
|
|||
/* ************************************************************* */
|
||||
|
||||
void
|
||||
initncurses ()
|
||||
initcurses ()
|
||||
{
|
||||
initscr ();
|
||||
cbreak ();
|
||||
|
@ -777,20 +780,6 @@ initncurses ()
|
|||
|
||||
/* ************************************************************* */
|
||||
|
||||
struct dg_user *
|
||||
deep_copy (struct dg_user *src)
|
||||
{
|
||||
struct dg_user *dest = malloc (sizeof (struct dg_user));
|
||||
|
||||
dest->username = strdup (src->username);
|
||||
dest->email = strdup (src->email);
|
||||
dest->env = strdup (src->env);
|
||||
dest->password = strdup (src->password);
|
||||
dest->flags = src->flags;
|
||||
|
||||
return dest;
|
||||
}
|
||||
|
||||
void
|
||||
loginprompt ()
|
||||
{
|
||||
|
@ -826,7 +815,7 @@ loginprompt ()
|
|||
|
||||
if ((me_index = userexist (user_buf)) != -1)
|
||||
{
|
||||
me = deep_copy (users[me_index]);
|
||||
me = users[me_index];
|
||||
error = 0;
|
||||
}
|
||||
}
|
||||
|
@ -1457,7 +1446,7 @@ main (int argc, char** argv)
|
|||
if (readfile (0))
|
||||
graceful_exit (110);
|
||||
|
||||
initncurses ();
|
||||
initcurses ();
|
||||
while ((userchoice != 'p') | (!loggedin))
|
||||
{
|
||||
drawmenu ();
|
||||
|
|
|
@ -71,8 +71,7 @@ extern int changepw (void);
|
|||
extern void domailuser (char *username);
|
||||
extern void drawmenu (void);
|
||||
extern void freefile (void);
|
||||
extern void initncurses (void);
|
||||
extern struct dg_user *deep_copy (struct dg_user *src);
|
||||
extern void initcurses (void);
|
||||
extern void loginprompt (void);
|
||||
extern void newuser (void);
|
||||
extern int passwordgood (char *cpw);
|
||||
|
|
11
ee.c
11
ee.c
|
@ -49,7 +49,7 @@
|
|||
| proprietary information which is protected by
|
||||
| copyright. All rights are reserved.
|
||||
|
|
||||
| $Header: /var/cvs/dgamelaunch/ee.c,v 1.8 2004/01/26 08:09:39 joshk Exp $
|
||||
| $Header: /var/cvs/dgamelaunch/ee.c,v 1.9 2004/01/26 08:29:04 joshk Exp $
|
||||
|
|
||||
*/
|
||||
|
||||
|
@ -62,7 +62,7 @@ char *ee_long_notice[] = {
|
|||
"copyright. All rights are reserved."
|
||||
};
|
||||
|
||||
char *version = "@(#) ee, version 1.4.1 $Revision: 1.8 $";
|
||||
char *version = "@(#) ee, version 1.4.1 $Revision: 1.9 $";
|
||||
|
||||
#include <curses.h>
|
||||
#include <signal.h>
|
||||
|
@ -2846,14 +2846,13 @@ struct menu_entries menu_list[];
|
|||
if (input == -1)
|
||||
exit(0);
|
||||
|
||||
if (((tolower(input) >= 'a') && (tolower(input) <= 'z')) ||
|
||||
((input >= '0') && (input <= '9')))
|
||||
if (isalnum(tolower(input)))
|
||||
{
|
||||
if ((tolower(input) >= 'a') && (tolower(input) <= 'z'))
|
||||
if (isalpha(tolower(input)))
|
||||
{
|
||||
temp = 1 + tolower(input) - 'a';
|
||||
}
|
||||
else if ((input >= '0') && (input <= '9'))
|
||||
else if (isdigit(input))
|
||||
{
|
||||
temp = (2 + 'z' - 'a') + (input - '0');
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
#include "stripgfx.h"
|
||||
|
||||
extern void domailuser (char *);
|
||||
extern void initncurses (void);
|
||||
extern void initcurses (void);
|
||||
extern char *chosen_name;
|
||||
extern int loggedin;
|
||||
|
||||
|
@ -208,7 +208,7 @@ ttypread (FILE * fp, Header * h, char **buf, int pread)
|
|||
case 'm':
|
||||
if (loggedin)
|
||||
{
|
||||
initncurses ();
|
||||
initcurses ();
|
||||
domailuser (chosen_name);
|
||||
/* XXX jilles: just quit out after mail for now */
|
||||
#if 0
|
||||
|
|
Loading…
Reference in New Issue