~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to libdrizzleclient/get_password.c

  • Committer: Padraig O'Sullivan
  • Date: 2009-03-21 01:02:23 UTC
  • mto: (960.2.5 mordred)
  • mto: This revision was merged to the branch mainline in revision 961.
  • Revision ID: osullivan.padraig@gmail.com-20090321010223-j8cph7eeyt1u3xol
Fixed function object to ensure it correctly returns a boolean type since
memcmp returns an integer. Added some more comments.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
** Ask for a password from tty
22
22
** This is an own file to avoid conflicts with curses
23
23
*/
 
24
#include <drizzled/global.h>
24
25
#include "libdrizzle.h"
 
26
#include "get_password.h"
25
27
 
26
28
#include <string.h>
27
29
#include <stdio.h>
28
30
#include <stdlib.h>
29
31
#include <ctype.h>
 
32
#include <unistd.h>
30
33
 
31
34
#include <sys/ioctl.h>
32
35
#ifdef HAVE_TERMIOS_H                           /* For tty-password */
88
91
}
89
92
 
90
93
 
91
 
char *get_tty_password(const char *opt_message)
 
94
char *drizzleclient_get_tty_password(const char *opt_message)
92
95
{
93
96
  TERMIO org,tmp;
94
97
  char buff[80];