mirror of
https://github.com/vivier/EMILE.git
synced 2024-11-14 22:04:43 +00:00
30 lines
483 B
C
30 lines
483 B
C
|
static __attribute__((used)) char* rcsid = "$CVSHeader$";
|
||
|
/*
|
||
|
*
|
||
|
* (c) 2004 Laurent Vivier <LaurentVivier@wanadoo.fr>
|
||
|
*
|
||
|
*/
|
||
|
|
||
|
#include "libemile.h"
|
||
|
|
||
|
int emile_map_seek_driver_partition(emile_map_t *map, int base)
|
||
|
{
|
||
|
int start;
|
||
|
int count;
|
||
|
int i;
|
||
|
int ret;
|
||
|
|
||
|
for (i = 0; i < emile_map_get_number(map); i++)
|
||
|
{
|
||
|
ret = emile_map_read(map, i);
|
||
|
if (ret == -1)
|
||
|
return -1;
|
||
|
|
||
|
emile_map_get_partition_geometry(map, &start, &count);
|
||
|
if (base == start)
|
||
|
return i;
|
||
|
}
|
||
|
|
||
|
return -1;
|
||
|
}
|