Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 6726 → Rev 6727

/programs/fs/unzip60/kolibri/Makefile.gcc
273,7 → 273,7
all: unzip$(EXE)
 
unzip$(EXE): $(OBJU) $(LIBBZIP2)
$(LD) $(LDFLAGS) $(LDVER) $(OBJU) $(LD_BZ2LIB) $(LDLIBS)
$(LD) $(LDFLAGS) $(LDVER) $(OBJU) $(LD_BZ2LIB) $(LDLIBS) -Map=unzip.exe.map
kos32-objcopy $@ -O binary
 
unzipsfx$(EXE): $(OBJX) $(LIBBZIP2X)
/programs/fs/unzip60/kolibri/dirent.c
116,7 → 116,7
 
int rc = sf_file(1, &di); // read dir
if(rc) {
fprintf(stderr, "Error %d reading dir item %s", rc, dirp->entry.d_name);
fprintf(stderr, "Error %d reading dir item %s\n", rc, dirp->entry.d_name);
errno = rc;
return NULL;
}
144,21 → 144,53
 
int mkdir(const char *_path, mode_t m)
{
struct fs_dirinfo di;
memset(&di, 0, sizeof di);
di.ppath = (char*)_path;
char namebuffer[1050]; // need for save data after di!!!
struct fs_dirinfo *di = (struct fs_dirinfo *)namebuffer;
 
int rc = sf_file(9, &di); // creat dir
debug_board_printf("mkdir start (%s)\n", _path);
memset(di, 0, sizeof(struct fs_dirinfo));
//di.ppath = (char*)_path; // dont work with 70.9
strcpy(di->path, _path);
 
int rc = sf_file(9, di); // creat dir
if(rc) {
fprintf(stderr, "Error %d creating dir item %s", rc, _path);
fprintf(stderr, "Error %d creating dir item %s\n", rc, _path);
errno = rc;
return -1;
}
 
debug_board_printf("mkdir end (%s)\n", _path);
return 0;
}
 
////////////////////////////////////////////////////////////////////////////////////////
void __attribute__ ((noinline)) debug_board_write_str(const char* str){
while(*str)
debug_board_write_byte(*str++);
}
 
void __attribute__ ((noinline)) debug_board_printf(const char *format,...)
{
va_list ap;
char log_board[300];
 
va_start (ap, format);
vsnprintf(log_board, sizeof log_board, format, ap);
va_end(ap);
debug_board_write_str(log_board);
}
 
__attribute__ ((noinline)) void trap(int n)
{
// nothing todo, just see n in debugger. use "bp trap" command
__asm__ __volatile__(
"nop"
:
:"a"(n));
}
 
 
 
/* tested example
void* read_folderdata(char* name)
{
/programs/fs/unzip60/kolibri/kos32.c
91,13 → 91,9
 
 
/********************************************************************************************************************/
/*** Function checkdir() */
/*** Function mapname() */
/********************************************************************************************************************/
 
/************************/
/* Function mapname() */
/************************/
 
int mapname(__G__ renamed)
__GDEF
int renamed;
212,7 → 208,8
/* disable control character filter when requested,
* else allow 8-bit characters (e.g. UTF-8) in filenames:
*/
;
if ((isprint(workch) || (128 <= workch && workch <= 254)))
*pp++ = (char)workch;
/*kos
if (uO.cflxflag ||
(isprint(workch) || (128 <= workch && workch <= 254)))
350,10 → 347,11
 
 
 
/***********************/
/* Function checkdir() */
/***********************/
/********************************************************************************************************************/
/*** Function checkdir() */
/********************************************************************************************************************/
 
 
int checkdir(__G__ pathcomp, flag)
__GDEF
char *pathcomp;