~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/serialize/replication_event_reader.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 "replication_event.pb.h"
5
5
using namespace std;
6
6
 
7
 
/* 
 
7
/*
8
8
  Example reader application for master.info data.
9
9
*/
10
10
 
11
 
void printRecord(const drizzle::EventList *list) 
 
11
void printRecord(const drizzle::EventList *list)
12
12
{
13
13
  using namespace drizzle;
14
14
  uint32_t x;
15
15
 
16
 
  for (x= 0; x < list->event_size(); x++) 
 
16
  for (x= 0; x < list->event_size(); x++)
17
17
  {
18
18
    const drizzle::Event event= list->event(x);
19
19
 
124
124
  }
125
125
}
126
126
 
127
 
int main(int argc, char* argv[]) 
 
127
int main(int argc, char* argv[])
128
128
{
129
129
  GOOGLE_PROTOBUF_VERIFY_VERSION;
130
130
 
131
 
  if (argc != 2) 
 
131
  if (argc != 2)
132
132
  {
133
133
    cerr << "Usage:  " << argv[0] << " replication event log " << endl;
134
134
    return -1;
139
139
  {
140
140
    // Read the existing master.info file
141
141
    fstream input(argv[1], ios::in | ios::binary);
142
 
    if (!list.ParseFromIstream(&input)) 
 
142
    if (!list.ParseFromIstream(&input))
143
143
    {
144
144
      cerr << "Failed to parse master.info." << endl;
145
145
      return -1;