~ubuntu-branches/ubuntu/quantal/mysql-workbench/quantal

« back to all changes in this revision

Viewing changes to library/sql-parser/source/my_messnc.cpp

  • Committer: Package Import Robot
  • Author(s): Dmitry Smirnov
  • Date: 2012-03-01 21:57:30 UTC
  • Revision ID: package-import@ubuntu.com-20120301215730-o7y8av8y38n162ro
Tags: upstream-5.2.38+dfsg
ImportĀ upstreamĀ versionĀ 5.2.38+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Copyright (C) 2000 MySQL AB
 
2
 
 
3
   This program is free software; you can redistribute it and/or modify
 
4
   it under the terms of the GNU General Public License as published by
 
5
   the Free Software Foundation; either version 2 of the License, or
 
6
   (at your option) any later version.
 
7
 
 
8
   This program is distributed in the hope that it will be useful,
 
9
   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
10
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11
   GNU General Public License for more details.
 
12
 
 
13
   You should have received a copy of the GNU General Public License
 
14
   along with this program; if not, write to the Free Software
 
15
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
16
 
 
17
#include "mysys_priv.h"
 
18
 
 
19
namespace mysql_parser
 
20
{
 
21
 
 
22
int my_message_no_curses(uint error __attribute__((unused)),
 
23
                         const char *str, myf MyFlags)
 
24
{
 
25
  DBUG_ENTER("my_message_no_curses");
 
26
  DBUG_PRINT("enter",("message: %s",str));
 
27
  (void) fflush(stdout);
 
28
  if (MyFlags & ME_BELL)
 
29
#ifdef __NETWARE__
 
30
    ringbell();                                                 /* Bell */
 
31
#else
 
32
    (void) fputc('\007',stderr);                                /* Bell */
 
33
#endif /* __NETWARE__ */
 
34
  if (my_progname)
 
35
  {
 
36
    (void)fputs(my_progname,stderr); (void)fputs(": ",stderr);
 
37
  }
 
38
  (void)fputs(str,stderr);
 
39
  (void)fputc('\n',stderr);
 
40
  (void)fflush(stderr);
 
41
  DBUG_RETURN(0);
 
42
}
 
43
 
 
44
} // namespace mysql_parser