int AddNewUser(int argc, char **argv) { int status; char **args, *info[MAX_ARGS_SIZE]; if (!(args = AskUserInfo(SetUserDefaults(info), FALSE))) { Put_message("Aborted."); return DM_NORMAL; } if ((status = do_mr_query("add_user_account", CountArgs(args), args, NULL, NULL))) com_err(program_name, status, " in add_user_account"); else Put_message("New user added to database."); FreeInfo(args); return DM_NORMAL; }
BOOL CGenethonDoc::OnSaveDocument(const char *pszPathName) { // Get printer orientation for this file. m_UserVars.m_Orientation = ((CGenethonApp *)AfxGetApp())->GetLandscape(); BeginWaitCursor(); // Write new user defaults to the comment list SetUserDefaults(); WriteMSFFile( pszPathName ); EndWaitCursor(); SetModifiedFlag(FALSE); // start off with unmodified return TRUE; }