fixed conversion issues
This commit is contained in:
parent
3701a20d22
commit
6c07827b21
@ -1,6 +1,6 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
printf("Hello World!\n");
|
||||
return 0;
|
||||
int main(void) {
|
||||
printf("Hello World!\n");
|
||||
return 0;
|
||||
}
|
||||
|
@ -62,11 +62,11 @@ void read_file_format(FILE* fp, char* filename) {
|
||||
*/
|
||||
void check_for_comments(FILE* fp) {
|
||||
char c;
|
||||
c = getc(fp);
|
||||
c = (char)getc(fp);
|
||||
while (c == '#') {
|
||||
while (getc(fp) != '\n')
|
||||
;
|
||||
c = getc(fp);
|
||||
c = (char)getc(fp);
|
||||
}
|
||||
ungetc(c, fp);
|
||||
}
|
||||
@ -157,7 +157,7 @@ GLubyte *imageToData(Image_t img) {
|
||||
Pixel_t pixel;
|
||||
GLubyte *data, size;
|
||||
unsigned long i;
|
||||
size = darraySize(img->pixels);
|
||||
size = (GLubyte)darraySize(img->pixels);
|
||||
data = (GLubyte *)malloc(3 * sizeof(GLubyte) * size);
|
||||
for(i = 0; i < size; i += 3) {
|
||||
pixel = darrayGet(img->pixels, i / 3);
|
||||
|
@ -83,7 +83,7 @@ void deleteImage(Image_t self) {
|
||||
* \param[in] xg Abscisse extrême gauche du segment
|
||||
* \return Pointeur sur un conteneur de segment
|
||||
*/
|
||||
Segment_t newSegment(uint64_t y, uint64_t xd, uint64_t xg) {
|
||||
Segment_t newSegment(uint16_t y, uint16_t xd, uint16_t xg) {
|
||||
Segment_t res;
|
||||
res = (Segment_t)malloc(sizeof(Segment));
|
||||
res->y = y;
|
||||
|
@ -120,7 +120,7 @@ Image_t newImage();
|
||||
/// \brief Destructeur d’une image
|
||||
void deleteImage(Image_t self);
|
||||
/// \brief Constructeur d’un segment de couleur unie
|
||||
Segment_t newSegment(uint64_t y, uint64_t xd, uint64_t xg);
|
||||
Segment_t newSegment(uint16_t y, uint16_t xd, uint16_t xg);
|
||||
/// \brief Destructeur d’un segment de couleur unie
|
||||
void deleteSegment(Segment_t self);
|
||||
/// \brief Constructeur de conteneur de zone
|
||||
|
Loading…
Reference in New Issue
Block a user