コード例 #1
0
int main(void) {
    struct nodo* lst1 = NULL;
    struct nodo* lst2 = NULL;
    
    crea_lista(&lst1, 1, 2, 3, 4, FIN);
    imprime(lst1);
    duplica(lst1);    
    imprime(lst1);
    
    crea_lista(&lst2, 4, 8, 15, 16, 23, 42, FIN);
    imprime(lst2);
    duplica(lst2);    
    imprime(lst2);

    return EXIT_SUCCESS;
}
コード例 #2
0
ファイル: blobsBack.c プロジェクト: alebianITBA/PI
/*Realiza el movimiento de las manchas llamando funciones*/
void mueveOduplica(tTablero* miT,tMovimiento* mov)
{
    double distancia;
    distancia = sqrt(pow((double)(mov->filaFinal- mov->filaInicial),2.0)+pow((double)(mov->colFinal- mov->colInicial),2.0));
    if(distancia<2)/*Duplica*/
    {
        duplica(miT, mov);
    }
    if(distancia>= 2)/*Se mueve*/
    {
        mueve(miT,mov);
    }
    return;
}
コード例 #3
0
ファイル: causalh.c プロジェクト: sthuck/itclocks
Cstamp* Cevent(Cstamp* in, gerador* gen) {
    Cstamp* res = duplica(in);
    insere((*gen)++, res);

    return res;
}
コード例 #4
0
ファイル: causalh.c プロジェクト: sthuck/itclocks
void Cfork(Cstamp* in, Cstamp** a, Cstamp** b) {
    *a = duplica(in);
    *b = duplica(in);
}