DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T v

⟦c2d990729⟧ TextFile

    Length: 745 (0x2e9)
    Types: TextFile
    Names: »vector_push.c«

Derivation

└─⟦060c9c824⟧ Bits:30007080 DKUUG TeX 2/12/89
    └─⟦this⟧ »./DVIware/crt-viewers/dviapollo/vector_push.c« 
└─⟦52210d11f⟧ Bits:30007239 EUUGD2: TeX 3 1992-12
    └─⟦af5ba6c8e⟧ »unix3.0/DVIWARE.tar.Z« 
        └─⟦ca79c7339⟧ 
            └─⟦this⟧ »DVIware/crt-viewers/dviapollo/vector_push.c« 

TextFile

/*SccS Id is @(#)vector_push.c	1.2 10/12/86
*/
#include "header.h"
/*How much longer to make the array when it needs to be reallocated.*/
#define LENGTHINCREMENT 10
/*Analogue of common lisp vector-push-extend for C arrays, except that 
this code just makes room for the new element but doesn't actually
copy it into the array.*/
void vector_push_extend (index, length, buffer, size)
     int *index;    /*The address of the fill pointer*/
     int *length;   /*The address of the real length*/
     char **buffer; /*The array itself.*/
     int size;      /*The size of the elements in the array*/
{
  if (*index >= *length) {
    (*length) += LENGTHINCREMENT;
    (*buffer) = (char *) realloc (*buffer, *length * size);
  };
  (*index)++;
};