/[marvin]/marvin/src/gui/file.cc
ViewVC logotype

Diff of /marvin/src/gui/file.cc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by castor_fou, Thu Sep 11 16:25:31 2003 UTC revision 1.4 by castor_fou, Tue Sep 16 20:25:36 2003 UTC
# Line 31  Line 31 
31  *  *
32  *******************************************************************/  *******************************************************************/
33  #include <fcntl.h>  #include <fcntl.h>
34    #include <crypt.h>
35  #include <unistd.h>  #include <unistd.h>
36  #include <sys/types.h>  #include <sys/types.h>
37  #include <sys/stat.h>  #include <sys/stat.h>
# Line 118  int c_list_user::load_user() Line 119  int c_list_user::load_user()
119    while (1)    while (1)
120      {      {
121        name = get_name(file);        name = get_name(file);
122        if ((name== NULL))        if (name == NULL)
123            break;            break;
124        pass = get_password(file);        pass = get_password(file);
125        neuronal = get_neuronal(file);        neuronal = get_neuronal(file);
126        if ((user = new c_user(name, pass, neuronal)) != NULL)  //       std::cout << "user :" << name << std::endl
127    //              << "pass :" << pass << std::endl
128    //              << "neur :" << neuronal << std::endl;
129          if ((user = new c_user(name, pass, neuronal, "")) != NULL)
130          {          {
131            if (add_user(user) != 0)            if (add_user(user) != 0)
132              return 1;              return 1;
# Line 149  int c_list_user::save_user() Line 153  int c_list_user::save_user()
153        fwrite(((*i).second)->get_name_user().c_str(),        fwrite(((*i).second)->get_name_user().c_str(),
154               sizeof (char), ((*i).second)->get_name_user().size(), file);               sizeof (char), ((*i).second)->get_name_user().size(), file);
155        fwrite(&sep, sizeof (char), 1, file);        fwrite(&sep, sizeof (char), 1, file);
156        fwrite(((*i).second)->get_password()->get_passphrase().c_str(),        fwrite(((*i).second)->get_password()->get_passphrase().c_str(),        
157               sizeof (char), ((*i).second)->get_password()->get_passphrase().size(), file);               sizeof (char), ((*i).second)->get_password()->get_passphrase().size(), file);
158        fwrite(&sep, sizeof (char), 1, file);        fwrite(&sep, sizeof (char), 1, file);
159        fwrite(((*i).second)->get_password()->get_neuronal().c_str(),        fwrite(((*i).second)->get_password()->get_neuronal().c_str(),

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26