~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/drizzledump_data.cc

  • Committer: Andrew Hutchings
  • Date: 2010-10-15 20:04:57 UTC
  • mto: This revision was merged to the branch mainline in revision 1859.
  • Revision ID: andrew@linuxjedi.co.uk-20101015200457-oyqro5t926nhywan
The escape function is a clone of libdrizzle's but C++'ified.  Unfortunately libdrizzle's is broken.  Fixed it here, will fix it in libdrizzle at a later date.

Show diffs side-by-side

added added

removed removed

Lines of Context:
364
364
      switch (*from)
365
365
      {
366
366
         case 0:
 
367
           output.append("\\0");
 
368
           break;
367
369
         case '\n':
 
370
           output.append("\\n");
 
371
           break;
368
372
         case '\r':
 
373
           output.append("\\r");
 
374
           break;
369
375
         case '\\':
 
376
           output.append("\\\\");
 
377
           break;
370
378
         case '\'':
 
379
           output.append("\\'");
 
380
           break;
371
381
         case '"':
 
382
           output.append("\\\"");
 
383
           break;
372
384
         case '\032':
373
 
           output.push_back('\\');
 
385
           output.append("\\Z");
 
386
           break;
374
387
         default:
 
388
           output.push_back(*from);
375
389
           break;
376
390
       }
377
391
    }
378
 
    output.push_back(*from);
 
392
    else
 
393
      output.push_back(*from);
379
394
    (void) *from++;
380
395
    from_size--;
381
396
  }