Chameleon

Chameleon Commit Details

Date:2011-08-06 23:16:04 (9 years 3 months ago)
Author:Evan Lojewski
Commit:1309
Parents: 1308
Message:Add a few placeholders for file io
Changes:
A/branches/xZenu/src/modules/klibc/ferror.c
A/branches/xZenu/src/modules/klibc/assert.c
A/branches/xZenu/src/modules/klibc/ftell.c
A/branches/xZenu/src/modules/klibc/fclose.c
A/branches/xZenu/src/modules/klibc/fseek.c
M/branches/xZenu/src/modules/klibc/Makefile

File differences

branches/xZenu/src/modules/klibc/Makefile
2525
2626
2727
28
28
29
2930
3031
qsort sha1hash onexit atexit exit \
snprintf vsnprintf sscanf vsscanf sprintf \
fwrite fprintf vfprintf printf\
fread2 fputc fputs fopen fread
fread2 fputc fputs fopen fread ftell fseek fclose ferror \
assert
include ../MakeInc.dir
branches/xZenu/src/modules/klibc/assert.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/*
* assert.c
*/
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
void __assert_fail(const char *expr, const char *file, unsigned int line)
{
printf("Assertion %s failed, file %s, line %u\n", expr, file, line);
while(1);
}
void __assert_rtn(const char *func, const char *file, int line, const char* expr)
{
printf("Assertion %s failed, file %s, line %u, function %s\n", expr, file, line, func);
while(1);
}
branches/xZenu/src/modules/klibc/fclose.c
1
2
3
4
5
6
7
8
9
10
11
/*
* fclose.c
*/
#include <stdio.h>
int fclose ( FILE * stream )
{
printf("WARNING: fseek not implimented.\n");
return 0;
}
branches/xZenu/src/modules/klibc/ferror.c
1
2
3
4
5
6
7
8
9
10
11
/*
* ferror.c
*/
#include <stdio.h>
int ferror ( FILE * stream )
{
printf("WARNING: ferror not implimented.\n");
return 0;
}
branches/xZenu/src/modules/klibc/fseek.c
1
2
3
4
5
6
7
8
9
10
11
/*
* fseek.c
*/
#include <stdio.h>
int fseek(FILE * stream, long int offset, int origin)
{
printf("WARNING: fseek not implimented.\n");
return 0;
}
branches/xZenu/src/modules/klibc/ftell.c
1
2
3
4
5
6
7
8
9
10
11
/*
* ftell.c
*/
#include <stdio.h>
long ftell(FILE* file)
{
printf("WARNING: ftell not implimented.\n");
return 0;
}

Archive Download the corresponding diff file

Revision: 1309