home *** CD-ROM | disk | FTP | other *** search
/ Games 1995 to 2000 / Games.iso / SexTetris / LOGIN.C < prev    next >
Encoding:
C/C++ Source or Header  |  1993-09-16  |  871 b   |  35 lines

  1. #include "microlib.h"
  2. #include <dos.h>
  3.  
  4. int login()
  5. {
  6. }
  7.  
  8. /**********************************************************************/
  9. /* int check_password(char *, char *)                                 */
  10. /* Returns:  1 if correct, 0 if not correct.                                     */
  11. /**********************************************************************/
  12. int check_password(codenamechk, password)
  13. char *codenamechk;
  14. char *password;
  15. {
  16.     D4DATA *db_employee;
  17.  
  18.     db_employee = d4open(&set, files(18));
  19.     d4tag_select(db_employee, d4tag(db_employee, "CODENAME_T"));
  20.     if(d4seek(db_employee, codenamechk) == 0) {
  21.         d4unlock_index(db_employee);
  22.         memcpy(user, f4str(d4field(db_employee, "CODE")), 7);
  23.  
  24.         if(password);
  25.         memcpy(privileges, "SU        ", 10);
  26.  
  27.         d4close(db_employee);
  28.         return(1);
  29.         }
  30.     d4unlock_index(db_employee);
  31.     d4close(db_employee);
  32.     return(0);
  33.     }
  34.  
  35.