Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 6861 → Rev 6862

/programs/system/shell/cmd/cmd_cd.c
1,12 → 1,5
 
static inline void set_cwd(const char* cwd)
{
__asm__ __volatile__(
"int $0x40"
::"a"(30),"b"(1),"c"(cwd));
};
 
 
int cmd_cd(char dir[])
{
 
/programs/system/shell/globals.h
5,7 → 5,7
extern char PARAM[256];
 
char title[64];
char cur_dir[256];
char cur_dir[FILENAME_MAX];
 
/// ===========================================================
 
16,8 → 16,8
 
#define CMD_HISTORY_NUM 11
 
char CMD[256];
char CMD_HISTORY[CMD_HISTORY_NUM][256];
char CMD[FILENAME_MAX * 2];
char CMD_HISTORY[CMD_HISTORY_NUM][FILENAME_MAX * 2];
char CMD_NUM = 0;
char CMD_HISTORY_NUM_REAL = 0;
unsigned LAST_PID = 0;
/programs/system/shell/shell.c
129,16 → 129,19
}
 
 
strcpy(cur_dir, PATH);
dir_truncate(cur_dir);
//strcpy(cur_dir, PATH);
//dir_truncate(cur_dir);
getcwd(cur_dir, sizeof cur_dir);
//printf("curdir %s\n", cur_dir);
 
con_set_cursor_height(con_get_font_height()-1);
 
ALIASES = malloc(128*1024);
 
if (PARAM[0] == 0)
if (!PARAM || PARAM[0] == 0)
{
strcpy(CMD, cur_dir);
strcpy(CMD, PATH);
dir_truncate(CMD);
strcat(CMD, ".shell");
if ( !file_check(CMD) )
strcpy(CMD, "/sys/settings/.shell");
/programs/system/shell/system/kolibri.c
436,3 → 436,17
{
asm volatile ("int $0x40"::"a"(54), "b"(2), "c"(n), "d"(buffer));
}
 
void set_cwd(const char* cwd)
{
__asm__ __volatile__(
"int $0x40"
::"a"(30),"b"(1),"c"(cwd));
};
 
int getcwd(char *buf, unsigned size)
{
__asm__ __volatile__(
"int $0x40"
::"a"(30),"b"(2),"c"(buf), "d"(size));
}
/programs/system/shell/system/kolibri.h
114,3 → 114,6
int kol_clip_num();
char* kol_clip_get(int n);
int kol_clip_set(int n, char buffer[]);
void set_cwd(const char* cwd);
int getcwd(char *buf, unsigned size);