~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/drizzle.cc

  • Committer: Toru Maesaka
  • Date: 2008-12-01 11:00:41 UTC
  • mto: (632.1.17 devel)
  • mto: This revision was merged to the branch mainline in revision 637.
  • Revision ID: dev@torum.net-20081201110041-gia57w4pw4qwh13t
Third pass of replacing MySQL's strmake() with libc calls

Show diffs side-by-side

added added

removed removed

Lines of Context:
3308
3308
  /* eliminate the spaces before the parameters */
3309
3309
  while (my_isspace(charset_info,*param))
3310
3310
    param++;
3311
 
  end= strmake(file_name, param, sizeof(file_name) - 1);
 
3311
  strncpy(file_name, param, sizeof(file_name) - 1);
 
3312
  end= file_name + strlen(file_name);
3312
3313
  /* remove end space from command line */
3313
3314
  while (end > file_name && (my_isspace(charset_info,end[-1]) ||
3314
3315
                             my_iscntrl(charset_info,end[-1])))
3369
3370
  }
3370
3371
  else
3371
3372
  {
3372
 
    end= strmake(pager_name, param, sizeof(pager_name)-1);
 
3373
    end= strncpy(pager_name, param, sizeof(pager_name)-1);
 
3374
    end+= strlen(pager_name);
3373
3375
    while (end > pager_name && (my_isspace(charset_info,end[-1]) ||
3374
3376
                                my_iscntrl(charset_info,end[-1])))
3375
3377
      end--;
3443
3445
      Two null bytes are needed in the end of buff to allow
3444
3446
      get_arg to find end of string the second time it's called.
3445
3447
    */
3446
 
    tmp= strmake(buff, line, sizeof(buff)-2);
 
3448
    tmp= strncpy(buff, line, sizeof(buff)-2);
3447
3449
#ifdef EXTRA_DEBUG
3448
3450
    tmp[1]= 0;
3449
3451
#endif
3502
3504
                    INFO_ERROR, 0,0);
3503
3505
  while (my_isspace(charset_info,*param))
3504
3506
    param++;
3505
 
  end= strmake(source_name,param,sizeof(source_name)-1);
 
3507
  end= strncpy(source_name,param,sizeof(source_name)-1);
 
3508
  end+= strlen(source_name);
3506
3509
  while (end > source_name && (my_isspace(charset_info,end[-1]) ||
3507
3510
                               my_iscntrl(charset_info,end[-1])))
3508
3511
    end--;