Subversion Repositories Kolibri OS

Rev

Rev 1905 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1905 Rev 3960
Line 103... Line 103...
103
		fi->next = fi_next(fi);
103
		fi->next = fi_next(fi);
104
		debug3("added pos %li to index with fill %lu and step %lu", (long) pos, (unsigned long)fi->fill, (unsigned long)fi->step);
104
		debug3("added pos %li to index with fill %lu and step %lu", (long) pos, (unsigned long)fi->fill, (unsigned long)fi->step);
105
	}
105
	}
106
}
106
}
Line -... Line 107...
-
 
107
 
-
 
108
int fi_set(struct frame_index *fi, off_t *offsets, off_t step, size_t fill)
-
 
109
{
-
 
110
	if(fi_resize(fi, fill) == -1) return -1;
-
 
111
	fi->step = step;
-
 
112
	if(offsets != NULL)
-
 
113
	{
-
 
114
		memcpy(fi->data, offsets, fill*sizeof(off_t));
-
 
115
		fi->fill = fill;
-
 
116
	}
-
 
117
	else
-
 
118
	{
-
 
119
		/* allocation only, no entries in index yet */
-
 
120
		fi->fill = 0;
-
 
121
	}
-
 
122
	fi->next = fi_next(fi);
-
 
123
	debug3("set new index of fill %lu, size %lu at %p",
-
 
124
	(unsigned long)fi->fill, (unsigned long)fi->size, (void*)fi->data);
-
 
125
	return 0;
-
 
126
}
107
 
127
 
108
void fi_reset(struct frame_index *fi)
128
void fi_reset(struct frame_index *fi)
109
{
129
{
110
	debug1("reset with size %"SIZE_P, (size_p)fi->size);
130
	debug1("reset with size %"SIZE_P, (size_p)fi->size);
111
	fi->fill = 0;
131
	fi->fill = 0;