~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/archive/archive_test.c

  • 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:
29
29
# else
30
30
#  include <time.h>
31
31
# endif
32
 
#endif  
 
32
#endif
33
33
 
34
34
#define COMMENT_STRING "Your bases"
35
35
#define FRM_STRING "My bases"
122
122
    return 0;
123
123
  }
124
124
 
125
 
  azwrite_comment(&writer_handle, (char *)COMMENT_STRING, 
 
125
  azwrite_comment(&writer_handle, (char *)COMMENT_STRING,
126
126
                  (unsigned int)strlen(COMMENT_STRING));
127
127
  azread_comment(&writer_handle, comment_str);
128
128
  assert(!memcmp(COMMENT_STRING, comment_str,
129
129
                strlen(COMMENT_STRING)));
130
130
 
131
 
  azwrite_frm(&writer_handle, (char *)FRM_STRING, 
 
131
  azwrite_frm(&writer_handle, (char *)FRM_STRING,
132
132
                  (unsigned int)strlen(FRM_STRING));
133
133
  azread_frm(&writer_handle, comment_str);
134
134
  assert(!memcmp(FRM_STRING, comment_str,
280
280
  return 0;
281
281
}
282
282
 
283
 
int size_test(uint64_t length, uint64_t rows_to_test_for, 
 
283
int size_test(uint64_t length, uint64_t rows_to_test_for,
284
284
              az_method method)
285
285
{
286
286
  azio_stream writer_handle, reader_handle;
291
291
  int error;
292
292
  int x;
293
293
 
294
 
  if (!(ret= azopen(&writer_handle, TEST_FILENAME, 
 
294
  if (!(ret= azopen(&writer_handle, TEST_FILENAME,
295
295
                    O_CREAT|O_RDWR|O_TRUNC,
296
296
                    method)))
297
297
  {
299
299
    exit(1);
300
300
  }
301
301
 
302
 
  for (count= 0, write_length= 0; write_length < length ; 
 
302
  for (count= 0, write_length= 0; write_length < length ;
303
303
       write_length+= ret)
304
304
  {
305
305
    count++;
357
357
long int timedif(struct timeval a, struct timeval b)
358
358
{
359
359
    register int us, s;
360
 
 
 
360
 
361
361
    us = a.tv_usec - b.tv_usec;
362
362
    us /= 1000;
363
363
    s = a.tv_sec - b.tv_sec;