1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
|
/* map.h - Map file creation */
/* Copyright 1992-1996 Werner Almesberger. See file COPYING for details. */
#ifndef MAP_H
#define MAP_H
#include "common.h"
#include "geometry.h"
void map_patch_first(char *name,char *str);
/* Puts str into the first sector of a map file. */
void map_create(char *name);
/* Create and initialize the specified map file. */
void map_done(DESCR_SECTORS *descr,SECTOR_ADDR addr[3]);
/* Updates and closes the map file. */
void map_add_sector(void *sector);
/* Adds the specified sector to the map file and registers it in the map
section. */
void map_begin_section(void);
/* Begins a map section. Note: maps can also be written to memory with
map_write. Thus, the map routines can be used even without map_create. */
void map_add(GEOMETRY *geo,int from,int num_sect);
/* Adds pointers to sectors from the specified file to the map file, starting
"from" sectors from the beginning. */
void map_add_zero(void);
/* Adds a zero-filled sector to the current section. */
int map_end_section(SECTOR_ADDR *addr,int dont_compact);
/* Writes a map section to the map file and returns the address of the first
sector of that section. The first DONT_COMPACT sectors are never compacted.
Returns the number of sectors that have been mapped. */
int map_write(SECTOR_ADDR *list,int max_len,int terminate);
/* Writes a map section to an array. If terminate is non-zero, a terminating
zero entry is written. If the section (including the terminating zero entry)
exceeds max_len sectors, map_write dies. */
#endif
|