Skip to content
This repository has been archived by the owner on Oct 22, 2018. It is now read-only.

Commit

Permalink
remove cube-encoding manipulation stuff from octascript api
Browse files Browse the repository at this point in the history
  • Loading branch information
q66 committed Aug 1, 2015
1 parent 85f9398 commit 506b519
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 35 deletions.
23 changes: 0 additions & 23 deletions media/scripts/core/octascript/stream.oct
Original file line number Diff line number Diff line change
Expand Up @@ -97,29 +97,6 @@ export var open_zip = @[server,func() { return undef },capi.stream_open_zip]
*/
export var open_gz = capi.stream_open_gz

/** Function: open_utf8
Like $open, but treats the file as UTF-8 input, translating to the
Cube 2 charset on the fly. This is often what you don't want, as you want
to read the input source as UTF-8 instead of the Cube encoding, but it
sometimes comes in handy.

Arguments:
- filename, mode - see $open.
- file - if provided, this should be a previously opened file stream -
in that case the prior two arguments are ignored and this is used as
source stream for the gzip stream. It doesn't close the previous
stream, merely reuses it. An internal refcounting mechanism makes
sure the original stream is preserved for as long as the child
stream is alive.

See also:
- $open
- $open_raw
- $open_zip
- $open_gz
*/
export var open_utf8 = capi.stream_open_utf8

/** Function: type
Checks if the given value is a file stream. Returns `stream` when it is,
`closed stream` when it's a closed stream and `undef` when it's not a stream.
Expand Down
12 changes: 0 additions & 12 deletions src/octa/octaforge/of_lua.cc
Original file line number Diff line number Diff line change
Expand Up @@ -221,18 +221,6 @@ namespace lua
? s_push_ret(L, 0, fname) : 1;
});

LUAICOMMAND(stream_open_utf8, {
STREAMOPENPARAMS(fname, mode, ud)
stream *file = NULL;
if (!lua_isnoneornil(L, 3)) {
file = s_get_stream(L, 3);
if (file->refcount < 0) file->refcount = 0;
file->incref();
}
return (!(*ud = openutf8file(fname, mode, file)))
? s_push_ret(L, 0, fname) : 1;
});

#undef STREAMOPENPARAMS

LUAICOMMAND(stream_type, {
Expand Down

0 comments on commit 506b519

Please sign in to comment.