Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Greg A. Woods
xfontsel
Commits
fbd548db
Commit
fbd548db
authored
Nov 26, 2003
by
Kaleb Keithley Keithley
Browse files
merge latest (4.3.99.16) from XFree86 (vendor) branch
parent
ec7cff5e
Changes
2
Hide whitespace changes
Inline
Side-by-side
ULabel.c
View file @
fbd548db
...
...
@@ -47,7 +47,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
/* $XFree86: xc/programs/xfontsel/ULabel.c,v 1.
3
200
1
/10/2
8 03:34:32
tsi Exp $ */
/* $XFree86: xc/programs/xfontsel/ULabel.c,v 1.
4
200
3
/10/2
4 20:38:18
tsi Exp $ */
/*
* ULabel.c - UCSLabel widget
...
...
@@ -274,10 +274,11 @@ static void _XawLabelDrawUCS(dpy, d, gc, x, y, str, n)
XDrawString16
(
dpy
,
d
,
gc
,
x
,
y
,
buf2b
,
ptr
-
buf2b
);
}
static
int
_XawLabelWidthUCS
(
fs
,
str
,
n
)
XFontStruct
*
fs
;
char
*
str
;
int
n
;
static
int
_XawLabelWidthUCS
(
XFontStruct
*
fs
,
char
*
str
,
int
n
)
{
char
*
ep
;
unsigned
short
codepoint
;
...
...
xfontsel.c
View file @
fbd548db
...
...
@@ -31,7 +31,7 @@ Author: Ralph R. Swick, DEC/MIT Project Athena
one weekend in November, 1989
Modified: Mark Leisher <mleisher@crl.nmsu.edu> to deal with UCS sample text.
*/
/* $XFree86: xc/programs/xfontsel/xfontsel.c,v 1.
7
200
1/10/28 03:34:32
tsi Exp $ */
/* $XFree86: xc/programs/xfontsel/xfontsel.c,v 1.
8
200
3/05/27 22:27:05
tsi Exp $ */
#include
<stdio.h>
#include
<stdlib.h>
...
...
@@ -797,9 +797,11 @@ static int strcmpn(const char *s1, const char *s2)
/* Order is *, (nil), rest */
int
AlphabeticSort
(
fval1
,
fval2
)
FieldValue
*
fval1
,
*
fval2
;
int
AlphabeticSort
(
_Xconst
void
*
fval1
,
_Xconst
void
*
fval2
)
{
# define fval1 ((_Xconst FieldValue *)fval1)
# define fval2 ((_Xconst FieldValue *)fval2)
if
(
fval1
->
string
&&
!
strcmp
(
fval1
->
string
,
"*"
))
return
-
1
;
if
(
fval2
->
string
&&
!
strcmp
(
fval2
->
string
,
"*"
))
...
...
@@ -808,14 +810,20 @@ int AlphabeticSort(fval1, fval2)
return
-
1
;
if
(
!
fval2
->
string
)
return
1
;
return
strcmpn
(
fval1
->
string
,
fval2
->
string
);
# undef fval1
# undef fval2
}
/* Order is *, (nil), rest */
int
NumericSort
(
fval1
,
fval2
)
FieldValue
*
fval1
,
*
fval2
;
int
NumericSort
(
_Xconst
void
*
fval1
,
_Xconst
void
*
fval2
)
{
# define fval1 ((_Xconst FieldValue *)fval1)
# define fval2 ((_Xconst FieldValue *)fval2)
if
(
fval1
->
string
&&
!
strcmp
(
fval1
->
string
,
"*"
))
return
-
1
;
if
(
fval2
->
string
&&
!
strcmp
(
fval2
->
string
,
"*"
))
...
...
@@ -824,7 +832,11 @@ int NumericSort(fval1, fval2)
return
-
1
;
if
(
!
fval2
->
string
)
return
1
;
return
atoi
(
fval1
->
string
)
-
atoi
(
fval2
->
string
);
# undef fval1
# undef fval2
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment