~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/serialize/master_list_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 "master_list.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::MasterList *list) 
 
11
void printRecord(const drizzle::MasterList *list)
12
12
{
13
13
  uint32_t x;
14
14
 
15
 
  for (x= 0; x < list->record_size(); x++) 
 
15
  for (x= 0; x < list->record_size(); x++)
16
16
  {
17
17
    const drizzle::MasterList_Record record= list->record(x);
18
18
 
33
33
  }
34
34
}
35
35
 
36
 
int main(int argc, char* argv[]) 
 
36
int main(int argc, char* argv[])
37
37
{
38
38
  GOOGLE_PROTOBUF_VERIFY_VERSION;
39
39
 
40
 
  if (argc != 2) 
 
40
  if (argc != 2)
41
41
  {
42
42
    cerr << "Usage:  " << argv[0] << " master.info " << endl;
43
43
    return -1;
48
48
  {
49
49
    // Read the existing master.info file
50
50
    fstream input(argv[1], ios::in | ios::binary);
51
 
    if (!list.ParseFromIstream(&input)) 
 
51
    if (!list.ParseFromIstream(&input))
52
52
    {
53
53
      cerr << "Failed to parse master.info." << endl;
54
54
      return -1;