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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pikelang
pike
Commits
f4f08df9
Commit
f4f08df9
authored
26 years ago
by
Henrik (Grubba) Grubbström
Browse files
Options
Downloads
Patches
Plain Diff
Added decode_charset().
Rev: lib/master.pike.in:1.39
parent
bc861da9
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/master.pike.in
+42
-1
42 additions, 1 deletion
lib/master.pike.in
with
42 additions
and
1 deletion
lib/master.pike.in
+
42
−
1
View file @
f4f08df9
/* $Id: master.pike.in,v 1.3
8
1999/02/
04 23:45:12 mast
Exp $
/* $Id: master.pike.in,v 1.3
9
1999/02/
26 01:08:52 grubba
Exp $
*
*
* Master-file for Pike.
* Master-file for Pike.
*
*
...
@@ -473,6 +473,11 @@ class dirnode
...
@@ -473,6 +473,11 @@ class dirnode
int _cache_full;
int _cache_full;
void fill_cache()
void fill_cache()
{
{
#ifdef RESOLV_DEBUG
werror(describe_backtrace(({ sprintf("Filling cache in dirnode %O\n",
dirname),
backtrace() })));
#endif /* RESOLV_DEBUG */
if (_cache_full) {
if (_cache_full) {
return;
return;
}
}
...
@@ -569,6 +574,10 @@ class joinnode
...
@@ -569,6 +574,10 @@ class joinnode
int _cache_full;
int _cache_full;
void fill_cache()
void fill_cache()
{
{
#ifdef RESOLV_DEBUG
werror(describe_backtrace(({ "Filling cache in joinnode\n",
backtrace() })));
#endif /* RESOLV_DEBUG */
if (_cache_full) {
if (_cache_full) {
return;
return;
}
}
...
@@ -957,6 +966,38 @@ void compile_warning(string file,int line,string err)
...
@@ -957,6 +966,38 @@ void compile_warning(string file,int line,string err)
}
}
static mixed _charset_mod;
/* This function is called by cpp() when it wants to do
* character code conversion.
*/
string decode_charset(string data, string charset)
{
werror(sprintf("decode_charset(%O, %O)\n", data, charset));
if (!_charset_mod) {
mixed mod = resolv("Locale");
_charset_mod = mod && mod["Charset"];
if (!_charset_mod) {
compile_warning("-", 0, "No Locale.Charset module!");
return 0;
}
}
object decoder;
catch {
decoder = _charset_mod->decoder(charset);
};
if (!decoder) {
compile_warning("-", 0, sprintf("Unknown charset %O!", charset));
return 0;
}
return decoder->feed(data)->drain();
}
/* This function is called whenever an #include directive is encountered
/* This function is called whenever an #include directive is encountered
* it receives the argument for #include and should return the file name
* it receives the argument for #include and should return the file name
* of the file to include
* of the file to include
...
...
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