OWLNext
7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
unix.cpp
Go to the documentation of this file.
1
//----------------------------------------------------------------------------
2
// ObjectWindows, OWL NExt
3
// Created by Kenneth Haley ( khaley@bigfoot.com )
4
//
5
/// \file
6
/// GNU suport functions
7
//
8
//----------------------------------------------------------------------------
9
#include <stdio.h>
10
11
12
#include <windows.h>
13
14
static
const
char
c_list[]=
"0123456789abcdefghijklmnopqrstuvwxyz"
;
15
16
char
*
my_itoa
(
int
val
,
char
*str,
int
radix
)
17
{
18
if
(
radix
==10)
19
{
20
sprintf
(str,
"%d"
,
val
);
21
}
22
char
tmp
[33];
23
int
cnt
=0,x=0;
24
while
(
cnt
<33)
25
{
26
if
(
val
<
radix
)
27
{
28
str[
cnt
]=
tmp
[
cnt
];
29
break
;
30
}
31
str[
cnt
]=
tmp
[
val
%
radix
];
32
val
/=
radix
;
33
++
cnt
;
34
}
35
tmp
[++
cnt
]=0;
36
for
(;
cnt
!=-1;
cnt
--,x++)
37
str[x]=
tmp
[
cnt
];
38
return
str;
39
}
40
41
char
*
myfullpath
(
char
* buf,
const
char
*
path
,
int
buflen
)
42
{
43
char
* x;
44
if
(!
GetFullPathName
(buf,
buflen
,
const_cast<
char
*
>
(
path
),&x))
45
return
0;
46
return
buf;
47
}
48
49
/*===========================================================*/
50
VarType
Definition
safearray.h:14
myfullpath
char * myfullpath(char *buf, const char *path, int buflen)
Definition
unix.cpp:41
my_itoa
char * my_itoa(int val, char *str, int radix)
Definition
unix.cpp:16
source
owlcore
unix.cpp
Generated by
1.10.0