repo.or.cz
/
window-docker.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Fix position of hidden panel, placed at screen edge with upper coordinate (usually...
[window-docker.git]
/
misc.c
blob
5727eea2f2d929565c4dffdba1eed204154bd1b4
1
#include <inttypes.h>
2
3
intmax_t
str_toIntMax
(
char
*
str
)
4
{
5
int
base
;
6
if
(*
str
==
'0'
) {
7
switch
(* ++
str
)
8
{
9
case
'\0'
:
return
0
;
str
++;
break
;
10
case
'x'
:
11
case
'X'
:
base
=
16
;
str
++;
break
;
12
case
'b'
:
13
case
'B'
:
base
=
2
;
str
++;
break
;
14
default
:
base
=
8
;
break
;
15
}
16
}
else
base
=
10
;
17
18
return
strtoimax
(
str
,
0
,
base
);
19
}