forked from KolibriOS/kolibrios
Whois: Now uses auto-import.
git-svn-id: svn://kolibrios.org@9658 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
22a11dad2b
commit
23e31695bd
@ -1,11 +1,10 @@
|
|||||||
if tup.getconfig("NO_TCC") ~= "" then return end
|
if tup.getconfig("NO_TCC") ~= "" then return end
|
||||||
|
if tup.getconfig("HELPERDIR") == ""
|
||||||
TCC="kos32-tcc"
|
then
|
||||||
|
HELPERDIR = "../../../programs"
|
||||||
CFLAGS = "-I../../develop/ktcc/trunk/libc.obj/include"
|
end
|
||||||
LDFAGS = "-nostdlib -L../../develop/ktcc/trunk/bin/lib ../../develop/ktcc/trunk/bin/lib/crt0.o"
|
tup.include(HELPERDIR .. "/use_tcc.lua")
|
||||||
|
|
||||||
LIBS = "-ltcc -lnetwork -lc.obj"
|
LIBS = "-lnetwork"
|
||||||
|
|
||||||
COMMAND=string.format("%s %s %s %s %s", TCC, CFLAGS, LDFAGS, "%f -o %o", LIBS)
|
link_tcc("whois.c", "whois");
|
||||||
tup.rule("whois.c", COMMAND .. tup.getconfig("KPACK_CMD"), "whois")
|
|
||||||
|
@ -5,8 +5,6 @@ https://www.binarytides.com/whois-client-code-in-c-with-linux-sockets/
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
int errno;
|
|
||||||
|
|
||||||
#include <sys/ksys.h>
|
#include <sys/ksys.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@ -41,7 +39,6 @@ char* str_copy(char*);
|
|||||||
|
|
||||||
int main(int argc , char *argv[])
|
int main(int argc , char *argv[])
|
||||||
{
|
{
|
||||||
networklib_init();
|
|
||||||
char *domain , *data = NULL;
|
char *domain , *data = NULL;
|
||||||
int f_flag=0;
|
int f_flag=0;
|
||||||
|
|
||||||
@ -60,7 +57,7 @@ int main(int argc , char *argv[])
|
|||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
if(out==stdout){
|
if(out==stdout){
|
||||||
con_init_opt(-1,-1,-1,-1, "Whois");
|
(*con_init_opt)(-1,-1,-1,-1, "Whois");
|
||||||
}
|
}
|
||||||
get_whois_data(domain , &data);
|
get_whois_data(domain , &data);
|
||||||
exit(0);
|
exit(0);
|
||||||
|
Loading…
Reference in New Issue
Block a user