Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 5731 → Rev 5730

/contrib/other/kpm/kpm.c
12,7 → 12,6
 
#define BUFFSIZE (64*1024)
 
char conbuf[256];
 
char *make_url(const char *name)
{
92,10 → 91,6
memcpy(buf, http->content_ptr+count, tail);
offset = tail;
}
 
sprintf(conbuf, "%d bytes loaded\r", http->content_received);
con_write_asciiz(conbuf);
 
}
received = http->content_received;
}
124,6 → 119,7
return received;
}
 
 
int main(int argc, char *argv[])
{
int count;
133,8 → 129,6
if(http_init())
goto err_init;
 
con_init(80, 25, 80, 250, "Kolibri package manager");
 
tmp_path = make_tmp_path("packages.xml");
 
count = http_load_file(tmp_path, make_url("packages.xml"));
157,10 → 151,7
remove_missing_packages(&install_list, &download_list);
 
list_for_each_entry(pkg, &install_list, list)
{
sprintf(conbuf,"install package %s-%s\n", pkg->name, pkg->version);
con_write_asciiz(conbuf);
};
printf("install package %s-%s\n", pkg->name, pkg->version);
 
set_cwd("/tmp0/1");
 
168,8 → 159,6
};
}
 
con_exit(0);
 
return 0;
 
err_init:
238,12 → 227,10
 
list_for_each_entry_safe(pkg, tmp, download_list, list)
{
sprintf(conbuf,"package %s-%s\n", pkg->name, pkg->version);
con_write_asciiz(conbuf);
printf("package %s-%s\n", pkg->name, pkg->version);
cache_path = make_cache_path(pkg->filename);
count = http_load_file(cache_path, make_url(pkg->filename));
sprintf(conbuf,"%s %d bytes loaded\n",cache_path, count);
con_write_asciiz(conbuf);
printf("%s loaded %d bytes\n",cache_path, count);
if( !test_archive(cache_path))
list_del_pkg(pkg);
else
261,8 → 248,7
{
if(ipkg->id == mpkg->id)
{
sprintf(conbuf,"skip missing package %s-%s\n", ipkg->name, ipkg->version);
con_write_asciiz(conbuf);
printf("skip missing package %s-%s\n", ipkg->name, ipkg->version);
list_del_pkg(ipkg);
};
}