Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 8576 → Rev 8633

/programs/system/shell/cmd/cmd_ps.c
18,13 → 18,13
for (i = 1;;i++)
{
n = kol_process_info(i, buf1k);
PID = *(buf1k+30);
memcpy(&PID, buf1k+30 ,sizeof(unsigned));
STATE = *(buf1k+50);
if (9 != STATE)
{
if (!sel || 0 == strnicmp(param, buf1k+10, 10))
{
printf (" %7d %11s %d\n\r", PID, buf1k+10, (*(int*)(buf1k+26)+1)/1024);
printf (" %7u %11s %d\n\r", PID, buf1k+10, (*(int*)(buf1k+26)+1)/1024);
if (sel)
{
LAST_PID = PID;
/programs/system/shell/modules/module_program_console.c
7,6 → 7,7
 
char name[32];
char *buffer;
char *buf1k;
int result;
int i;
char command;
17,8 → 18,8
strcat(name, "-SHELL");
 
buffer = NULL;
buf1k = NULL;
 
 
for (i = 0; i < 30; i++)
{
result = kol_buffer_open(name, SHM_OPEN | SHM_WRITE, 0, &buffer);
41,7 → 42,6
switch (command)
{
case SC_EXIT:
*buffer = SC_OK;
is_end = 1;
76,6 → 76,14
*buffer = SC_OK;
break;
case SC_GET_PID:
buf1k=malloc(1024);
kol_process_info(-1, buf1k);
memcpy(buffer+1, buf1k+30, sizeof(unsigned));
*buffer = SC_OK;
free(buf1k);
break;
default:
#if LANG_ENG
printf (" Error in console application.\n\r");
/programs/system/shell/program_console.h
6,3 → 6,4
#define SC_GETC 4
#define SC_GETS 5
#define SC_CLS 6
#define SC_GET_PID 7