/programs/cmm/browser/WebView.c |
---|
292,7 → 292,7 |
} |
else |
{ |
strncpy(#URL,"http://",7); |
strlcpy(#URL,"http://",7); |
strcat(#URL, #editURL); |
} |
OpenPage(); |
336,7 → 336,7 |
return; |
case DOWNLOAD_MANAGER: |
if (!downloader_opened) { |
strncpy(#DL_URL, "http://",7); |
strlcpy(#DL_URL, "http://",7); |
CreateThread(#Downloader,#downloader_stak+4092); |
} |
return; /* |
/programs/cmm/eolite/Eolite.c |
---|
397,7 → 397,7 |
Paste(); |
break; |
case 032: //Ctrl+D - set as bg |
strncpy(#temp, "\\S__",4); |
strlcpy(#temp, "\\S__",4); |
strcat(#temp, #file_path); |
RunProgram("/sys/media/kiv", #temp); |
break; |
/programs/cmm/eolite/include/left_panel.h |
---|
94,7 → 94,7 |
for (j1=0; j1<dev_disc_num; j1++;) |
{ |
l=sprintf(#sys_discs,"%s%s/",#dev_name,j1*304+ buf+72); |
strncpy(#disk_list[disc_num].Item, #sys_discs,l); |
strlcpy(#disk_list[disc_num].Item, #sys_discs,l); |
disc_num++; |
} |
if (!strncmp(#sys_discs, "/rd/1/",6)) |
102,7 → 102,7 |
GetDir(#tempbuf, #temp_file_count, "/kolibrios/", DIRS_ONLYREAL); |
if (temp_file_count) |
{ |
strncpy(#disk_list[disc_num].Item, "/kolibrios/",11); |
strlcpy(#disk_list[disc_num].Item, "/kolibrios/",11); |
kolibrios_drive = true; |
disc_num++; |
} |
/programs/cmm/lib/file_system.h |
---|
281,10 → 281,10 |
:dword ConvertSize(dword bytes) |
{ |
byte size_nm[4]; |
if (bytes>=1073741824) strncpy(#size_nm, "Gb",2); |
else if (bytes>=1048576) strncpy(#size_nm, "Mb",2); |
else if (bytes>=1024) strncpy(#size_nm, "Kb",2); |
else strncpy(#size_nm, "b ",2); |
if (bytes>=1073741824) strlcpy(#size_nm, "Gb",2); |
else if (bytes>=1048576) strlcpy(#size_nm, "Mb",2); |
else if (bytes>=1024) strlcpy(#size_nm, "Kb",2); |
else strlcpy(#size_nm, "b ",2); |
while (bytes>1023) bytes/=1024; |
sprintf(#ConvertSize_size_prefix,"%d %s",bytes,#size_nm); |
return #ConvertSize_size_prefix; |
/programs/cmm/lib/strings.h |
---|
13,7 → 13,7 |
// strlen( EDI) |
// utf8_strlen( ESI) |
// strcpy( EDI, ESI) --- 0 if == |
// strncpy(dword text1,text2,signed length) |
// strlcpy(dword text1,text2,signed length) |
// strcat( EDI, ESI) |
// strncat(dword text1,text2,signed length) --- pasting the text of a certain length |
// strchr( ESI,BL) --- find first BL |
216,34 → 216,6 |
$jnz L2 |
} |
inline dword strncpy(dword text1, text2, signed len) |
signed o1,o2; |
{ |
if(!text1)||(!len) return text1; |
if(len<4) |
{ |
o2 = len; |
goto RUN_BYTE; |
} |
o1 = len/4; |
o2 = len-4*o1; |
while(o1){ |
DSDWORD[text1] = DSDWORD[text2]; |
text1 += 4; |
text2 += 4; |
$dec o1 |
} |
RUN_BYTE: |
while(o2){ |
DSBYTE[text1] = DSBYTE[text2]; |
$inc text1 |
$inc text2 |
$dec o2 |
} |
DSBYTE[text1] = 0; |
return text1; |
} |
inline fastcall int strlcpy(dword ESI, EDI, EBX) |
{ |
if (EBX<0) return -1; |
759,7 → 731,7 |
dword l = strlen(text); |
dword ret = malloc(l+1); |
if(!ret) return NULL; |
strncpy(ret,text,l); |
strlcpy(ret,text,l); |
return ret; |
} |
771,7 → 743,7 |
copy = malloc(len + 1); |
if (copy != NULL) |
{ |
strncpy(copy, str, len); |
strlcpy(copy, str, len); |
DSBYTE[len+copy] = '\0'; |
} |
return copy; |
/programs/cmm/pixie/pixie.c |
---|
149,8 → 149,6 |
mouse.get(); |
if (tmp_x!=mouse.x) || (tmp_y!=mouse.y) |
{ |
debugi(mouse.x); |
debugi(tmp_x); |
z1 = Form.left + mouse.x - tmp_x; |
z2 = Form.top + mouse.y - tmp_y; |
if(z1<=10) || (z1>20000) z1=0; else if(z1>screen.width-Form.width-10)z1=screen.width-Form.width; |