~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/drizzle.cc

  • Committer: Monty Taylor
  • Date: 2008-08-12 23:54:34 UTC
  • mfrom: (322.1.1 codestyle)
  • mto: This revision was merged to the branch mainline in revision 324.
  • Revision ID: monty@inaugust.com-20080812235434-unrwb64yanvrkyzf
Merged up from codestyle.

Show diffs side-by-side

added added

removed removed

Lines of Context:
167
167
static char * opt_drizzle_unix_port=0;
168
168
static int connect_flag=CLIENT_INTERACTIVE;
169
169
static char *current_host,*current_db,*current_user=0,*opt_password=0,
170
 
  *delimiter_str= 0,*current_prompt=0,
171
 
  *default_charset= (char*) MYSQL_DEFAULT_CHARSET_NAME;
 
170
  *delimiter_str= 0,* current_prompt= 0,
 
171
  *default_charset= (char*) DRIZZLE_DEFAULT_CHARSET_NAME;
172
172
static char *histfile;
173
173
static char *histfile_tmp;
174
174
static string *glob_buffer;
999
999
 
1000
1000
int history_length;
1001
1001
static int not_in_history(const char *line);
1002
 
static void initialize_readline (const char *name);
 
1002
static void initialize_readline (char *name);
1003
1003
static void fix_history(string *final_command);
1004
1004
 
1005
1005
static COMMANDS *find_command(const char *name,char cmd_name);
1132
1132
          server_version_string(&drizzle));
1133
1133
  put_info(output_buff, INFO_INFO, 0, 0);
1134
1134
 
1135
 
  initialize_readline(my_progname);
 
1135
  initialize_readline(current_prompt);
1136
1136
  if (!status.batch && !quick)
1137
1137
  {
1138
1138
    /* read-history from file, default ~/.drizzle_history*/
1176
1176
  if (opt_outfile)
1177
1177
    end_tee();
1178
1178
  drizzle_end(0);
1179
 
#ifndef _lint
 
1179
 
1180
1180
  return(0);        // Keep compiler happy
1181
 
#endif
1182
1181
}
1183
1182
 
1184
1183
sig_handler drizzle_end(int sig)
2172
2171
  return 1;
2173
2172
}
2174
2173
 
2175
 
static void initialize_readline (const char *name)
 
2174
static void initialize_readline (char *name)
2176
2175
{
2177
2176
  /* Allow conditional parsing of the ~/.inputrc file. */
2178
 
  rl_readline_name= (const char *)name;
 
2177
  rl_readline_name= name;
2179
2178
 
2180
2179
  /* Tell the completer that we want a crack first. */
2181
2180
  rl_attempted_completion_function= (rl_completion_func_t*)&mysql_completion;
4345
4344
{
4346
4345
  char *ptr=strchr(line, ' ');
4347
4346
  prompt_counter = 0;
4348
 
  my_free(current_prompt,MYF(MY_ALLOW_ZERO_PTR));
 
4347
  my_free(current_prompt, MYF(MY_ALLOW_ZERO_PTR));
4349
4348
  current_prompt= strdup(ptr ? ptr+1 : default_prompt);
4350
4349
  if (!ptr)
4351
4350
    tee_fprintf(stdout, "Returning to default PROMPT of %s\n",