~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/serialize/master_list_writer.cc

  • Committer: Eric Herman
  • Date: 2008-12-06 19:42:46 UTC
  • mto: (656.1.6 devel)
  • mto: This revision was merged to the branch mainline in revision 665.
  • Revision ID: eric@mysql.com-20081206194246-5cdexuu81i366eek
removed trailing whitespace with simple script:

for file in $(find . -name "*.c") $(find . -name "*.cc") $(find . -name "*.h"); do ruby -pe 'gsub(/\s+$/, $/)' < $file > $file.out; mv $file.out $file; done;

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
#include "master_list.pb.h"
5
5
using namespace std;
6
6
 
7
 
/* 
 
7
/*
8
8
  Example script for reader a Drizzle master replication list.
9
9
*/
10
10
 
11
 
void fill_master_record(drizzle::MasterList_Record *record, const char *hostname) 
 
11
void fill_master_record(drizzle::MasterList_Record *record, const char *hostname)
12
12
{
13
13
  using namespace drizzle;
14
14
  record->set_hostname(hostname);
20
20
  record->set_log_position(0);
21
21
}
22
22
 
23
 
int main(int argc, char* argv[]) 
 
23
int main(int argc, char* argv[])
24
24
{
25
25
  GOOGLE_PROTOBUF_VERIFY_VERSION;
26
26
 
35
35
  fill_master_record(list.add_record(), "foo.example.com");
36
36
 
37
37
  fstream output(argv[1], ios::out | ios::trunc | ios::binary);
38
 
  if (!list.SerializeToOstream(&output)) 
 
38
  if (!list.SerializeToOstream(&output))
39
39
  {
40
40
    cerr << "Failed to write master_list." << endl;
41
41
    return -1;