~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/default_modify.cc

  • Committer: Eric Herman
  • Date: 2008-12-06 22:37:37 UTC
  • mfrom: (656.1.6 devel)
  • mto: (656.1.8 devel)
  • mto: This revision was merged to the branch mainline in revision 665.
  • Revision ID: eric@mysql.com-20081206223737-viem01l5uhm0w14r
mergedĀ fromĀ lp:drizzle/mordred

Show diffs side-by-side

added added

removed removed

Lines of Context:
156
156
      }
157
157
 
158
158
      for (; nr_newlines; nr_newlines--)
159
 
        dst_ptr= my_stpcpy(dst_ptr, NEWLINE);
 
159
        dst_ptr= strcpy(dst_ptr, NEWLINE)+NEWLINE_LEN;
160
160
 
161
161
      /* Skip the section if MY_REMOVE_SECTION was given */
162
162
      if (!in_section || remove_option != MY_REMOVE_SECTION)
163
 
        dst_ptr= my_stpcpy(dst_ptr, linebuff);
 
163
        dst_ptr= strcpy(dst_ptr, linebuff);
 
164
        dst_ptr+= strlen(linebuff);
164
165
    }
165
166
    /* Look for a section */
166
167
    if (*src_ptr == '[')
199
200
  {
200
201
    /* New option still remains to apply at the end */
201
202
    if (!remove_option && *(dst_ptr - 1) != '\n')
202
 
      dst_ptr= my_stpcpy(dst_ptr, NEWLINE);
 
203
      dst_ptr= strcpy(dst_ptr, NEWLINE)+NEWLINE_LEN;
203
204
    dst_ptr= add_option(dst_ptr, option_value, option, remove_option);
204
205
    opt_applied= 1;
205
206
  }
206
207
  for (; nr_newlines; nr_newlines--)
207
 
    dst_ptr= my_stpcpy(dst_ptr, NEWLINE);
 
208
    dst_ptr= strcpy(dst_ptr, NEWLINE)+NEWLINE_LEN;
208
209
 
209
210
  if (opt_applied)
210
211
  {
234
235
{
235
236
  if (!remove_option)
236
237
  {
237
 
    dst= my_stpcpy(dst, option);
 
238
    dst= strcpy(dst, option);
 
239
    dst+= strlen(option);
238
240
    if (*option_value)
239
241
    {
240
242
      *dst++= '=';
241
 
      dst= my_stpcpy(dst, option_value);
 
243
      dst= strcpy(dst, option_value);
 
244
      dst+= strlen(option_value);
242
245
    }
243
246
    /* add a newline */
244
 
    dst= my_stpcpy(dst, NEWLINE);
 
247
    dst= strcpy(dst, NEWLINE)+NEWLINE_LEN;
245
248
  }
246
249
  return dst;
247
250
}