Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
b565bb78
Commit
b565bb78
authored
15 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Work with MINGW compiler. No need to have cygwin1.dll.
parent
0ca44d66
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
build/exe/doliwamp/UsedPort.cpp
+16
-53
16 additions, 53 deletions
build/exe/doliwamp/UsedPort.cpp
build/exe/doliwamp/UsedPort.exe
+0
-0
0 additions, 0 deletions
build/exe/doliwamp/UsedPort.exe
with
16 additions
and
53 deletions
build/exe/doliwamp/UsedPort.cpp
+
16
−
53
View file @
b565bb78
...
...
@@ -129,53 +129,12 @@ WSADATA Data;
#endif
// Functions
void
chartospace
(
char
*
str
,
char
c
);
int
mail_connect
();
int
Ack
(
SOCKET
sc
);
int
Ack_Stat
(
SOCKET
sc
,
int
*
iNbUnread
,
unsigned
long
int
*
lSizeUnread
);
int
Ack_Mail
(
SOCKET
sc
,
int
mailcpt
,
const
unsigned
long
int
liMailSize
);
int
DoQuit
(
int
iRet
);
void
chartospace
(
char
*
str
,
char
c
)
//---------------------------------------------------------------------------
// Replace c char by space char in str string
//---------------------------------------------------------------------------
{
register
int
x
;
for
(
x
=
0
;
str
[
x
];
x
++
)
if
(
str
[
x
]
==
c
)
str
[
x
]
=
' '
;
}
char
x2c
(
const
char
*
what
)
//---------------------------------------------------------------------------
// Convert a string "XX" in a the char with XX ASCII value
//---------------------------------------------------------------------------
{
register
char
digit
;
digit
=
(
what
[
0
]
>=
'A'
?
((
what
[
0
]
&
0xDF
)
-
'A'
)
+
10
:
(
what
[
0
]
-
'0'
));
digit
=
digit
<<
4
;
digit
+=
(
what
[
1
]
>=
'A'
?
((
what
[
1
]
&
0xDF
)
-
'A'
)
+
10
:
(
what
[
1
]
-
'0'
));
return
(
digit
);
}
int
printline
(
const
char
*
s
)
//---------------------------------------------------------------------------
// Print string s on stdout (Don't touch <> tags)
//---------------------------------------------------------------------------
{
int
taghtml
=
0
;
for
(
size_t
i
=
0
;
i
<
strlen
(
s
);
i
++
)
{
if
(
s
[
i
]
==
'<'
)
++
taghtml
;
if
(
s
[
i
]
==
'>'
)
--
taghtml
;
else
printf
(
"%c"
,
s
[
i
]);
}
return
(
0
);
}
int
DoQuit
(
int
iRet
)
//---------------------------------------------------------------------------
// Show result
...
...
@@ -193,7 +152,7 @@ int testConnect()
{
SOCKET
sc
;
char
s
[
2048
],
t
[
256
];
int
i
,
firstmail
,
lastmail
,
mailcpt
;
int
i
;
startgetmess:
...
...
@@ -234,14 +193,17 @@ startgetmess:
if
(
connect
(
sc
,(
const
struct
sockaddr
*
)
&
sin
,
sizeof
(
sin
)))
#endif
{
printf
(
"Failed to connect !
\n
"
);
return
(
DoQuit
(
FAILED_TO_CONNECT
));
}
//***** Server welcome message
// if ((iRet=Ack(sc))) {
// return(DoQuit(iRet));
// }
printf
(
"Connected !
\n
"
);
/*
if ((iRet=Ack(sc))) {
return(DoQuit(iRet));
}
*/
//***** Disconect
return
(
DoQuit
(
0
));
...
...
@@ -287,8 +249,8 @@ int main(int argc, char **argv)
//---------------------------------------------------------------------------
{
//
Exploite
paramet
r
es
//----------------
----
//
Read
paramete
r
s
//----------------
int
noarg
,
curseurarg
,
help
=
0
,
invalide
=
0
;
char
option
;
...
...
@@ -310,13 +272,14 @@ for (noarg=1;noarg<argc;noarg++) {
help
=!
(
Port
>
0
);
//
Affiche en-tet
e
//-----------
-----
//
Show usag
e
//-----------
Usage
:
if
(
help
)
{
printf
(
"----- %s V%s (c)Laurent Destailleur -----
\n
"
,
PROG
,
VERSION
);
printf
(
"%s is a software that allows you to know if a TCP/IP port is used
\n
"
,
PROG
);
printf
(
"%s sources can be compiled for WIN32 (VC++ or GCC) or for Unix/Linux (GCC)
\n
"
,
PROG
);
printf
(
"%s sources can be compiled for WIN32 (VC++, GCC CYGWIN, MINGW) or for
\n
"
);
printf
(
"Unix/Linux (GCC)
\n
"
,
PROG
);
printf
(
"
\n
"
);
}
...
...
@@ -335,8 +298,8 @@ if (help|invalide) {
//
If HTMLxxx is a file
//-------------------
--
//
Print input values
//-------------------
printf
(
"Port=%d
\n
"
,
Port
);
printf
(
"Host=%s
\n
"
,
Host
);
...
...
This diff is collapsed.
Click to expand it.
build/exe/doliwamp/UsedPort.exe
+
0
−
0
View file @
b565bb78
No preview for this file type
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment