~ubuntu-branches/ubuntu/hardy/kvm/hardy-backports

« back to all changes in this revision

Viewing changes to qemu/readline.c

  • Committer: Bazaar Package Importer
  • Author(s): Soren Hansen
  • Date: 2008-01-03 10:39:25 UTC
  • mfrom: (1.1.16 upstream)
  • Revision ID: james.westby@ubuntu.com-20080103103925-8480u7sq2646hvbh
Tags: 1:59+dfsg-0ubuntu1
* New upstream release
* Build with alsa support (cherry pick from 57+dfsg-2)

Show diffs side-by-side

added added

removed removed

Lines of Context:
267
267
            new_entry = hist_entry;
268
268
            /* Put this entry at the end of history */
269
269
            memmove(&term_history[idx], &term_history[idx + 1],
270
 
                    &term_history[TERM_MAX_CMDS] - &term_history[idx + 1]);
 
270
                    (TERM_MAX_CMDS - idx + 1) * sizeof(char *));
271
271
            term_history[TERM_MAX_CMDS - 1] = NULL;
272
272
            for (; idx < TERM_MAX_CMDS; idx++) {
273
273
                if (term_history[idx] == NULL)
280
280
        /* Need to get one free slot */
281
281
        free(term_history[0]);
282
282
        memcpy(term_history, &term_history[1],
283
 
               &term_history[TERM_MAX_CMDS] - &term_history[1]);
 
283
               (TERM_MAX_CMDS - 1) * sizeof(char *));
284
284
        term_history[TERM_MAX_CMDS - 1] = NULL;
285
285
        idx = TERM_MAX_CMDS - 1;
286
286
    }