Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pike
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pikelang
pike
Commits
624e38de
Commit
624e38de
authored
Jan 30, 1997
by
Mirar (Pontus Hagland)
Browse files
Options
Downloads
Patches
Plain Diff
debug
Rev: src/modules/image/font.c:1.12
parent
802d9f4c
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/modules/image/font.c
+33
-1
33 additions, 1 deletion
src/modules/image/font.c
with
33 additions
and
1 deletion
src/modules/image/font.c
+
33
−
1
View file @
624e38de
#include
<config.h>
/* $Id: font.c,v 1.1
1
1997/01/
27 07:56:11 per
Exp $ */
/* $Id: font.c,v 1.1
2
1997/01/
30 14:24:55 law
Exp $ */
#include
"global.h"
...
...
@@ -198,6 +198,10 @@ void font_load(INT32 args)
{
int
i
;
#ifdef FONT_DEBUG
fprintf
(
stderr
,
"FONT mapped ok
\n
"
);
#endif
struct
file_head
{
unsigned
INT32
cookie
;
...
...
@@ -218,8 +222,14 @@ void font_load(INT32 args)
if
(
ntohl
(
fh
->
cookie
)
==
0x464f4e54
)
/* "FONT" */
{
#ifdef FONT_DEBUG
fprintf
(
stderr
,
"FONT cookie ok
\n
"
);
#endif
if
(
ntohl
(
fh
->
version
)
==
1
)
{
#ifdef FONT_DEBUG
fprintf
(
stderr
,
"FONT version 1
\n
"
);
#endif
unsigned
long
i
;
struct
font
*
new
;
...
...
@@ -255,6 +265,10 @@ void font_load(INT32 args)
}
else
/* illegal <tm> offset or illegal align */
{
#ifdef FONT_DEBUG
fprintf
(
stderr
,
"FONT failed on char %02xh %d '%c'
\n
"
,
i
,
i
,
i
);
#endif
free_font_struct
(
new
);
THIS
=
NULL
;
pop_n_elems
(
args
);
...
...
@@ -268,15 +282,33 @@ void font_load(INT32 args)
pop_n_elems
(
args
);
THISOBJ
->
refs
++
;
push_object
(
THISOBJ
);
/* success */
#ifdef FONT_DEBUG
fprintf
(
stderr
,
"FONT successfully loaded
\n
"
);
#endif
return
;
}
/* wrong version */
#ifdef FONT_DEBUG
else
fprintf
(
stderr
,
"FONT unknown version
\n
"
);
#endif
}
/* wrong cookie */
#ifdef FONT_DEBUG
else
fprintf
(
stderr
,
"FONT wrong cookie
\n
"
);
#endif
}
/* mem failure */
#ifdef FONT_DEBUG
else
fprintf
(
stderr
,
"FONT mem failure
\n
"
);
#endif
free_font_struct
(
THIS
);
THIS
=
NULL
;
}
/* size failure */
#ifdef FONT_DEBUG
else
fprintf
(
stderr
,
"FONT size failure
\n
"
);
#endif
close
(
fd
);
}
/* fd failure */
#ifdef FONT_DEBUG
else
fprintf
(
stderr
,
"FONT fd failure
\n
"
);
#endif
pop_n_elems
(
args
);
push_int
(
0
);
...
...
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