/*--------------------------------------------------------------------
 * FICHERO:  IndPonRe.c
 * OBJETIVO: Definir la funcin Ind_PonRegistro()
 * AUTOR:    Pedro Reina
 * FECHA:    L.31.7.1995
 *------------------------------------------------------------------*/

/*--------------------------------------------------------------------
 * Ficheros de cabecera
 *------------------------------------------------------------------*/

#include "Indice.h"

/*--------------------------------------------------------------------
 * Definicin de funciones
 *------------------------------------------------------------------*/

/*--------------------------------------------------------------------
 * FUNCION:  Ind_PonRegistro()
 * OBJETIVO: Poner el registro correspondiente a un item de la pgina
 *           en memoria
 * ENTRADAS: El ndice, el nmero de item y el registro
 * SALIDAS:  Ninguna
 * NOTAS:    1. Los items se cuentan a partir de 0
 *           2. No se comprueba que el item sea vlido
 *           3. Los registros se numeran a partir de 0
 * EJEMPLO:  Ind_PonRegistro ( Agenda, 2, 34 )
 *------------------------------------------------------------------*/
void Ind_PonRegistro (Indice, NumItem, Registro)
indice   Indice;
contador NumItem;
entero   Registro;
  {
  memoria Pos;
  
  Pos = Ind_Pagina(Indice) + Ind_Desplazamiento (Indice,NumItem) + 4;
  Mem_EscribeEntero (Pos, MEM_INTEL, Registro+1);
  }