diff options
author | Timo Sirainen <cras@irssi.org> | 2001-07-29 09:17:53 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2001-07-29 09:17:53 +0000 |
commit | 6c2f9c685aaf4aa79c9ea3f29efe0c22aa0a98ee (patch) | |
tree | 0f6377555e2b9cdc881731fd06dc3723632150ac /src/perl/perl-core.h | |
parent | 2d5edb8c4d56f75f4dab93929072cc2699ec5ccd (diff) | |
download | irssi-6c2f9c685aaf4aa79c9ea3f29efe0c22aa0a98ee.zip |
--enable-perl* -> --with-perl*. Added a new libfe_perl which handles /SCRIPT
commands. /RUN -> /SCRIPT LOAD, /PERLFLUSH -> /SCRIPT FLUSH, /PERL ->
/SCRIPT EXEC. Added /SCRIPT UNLOAD, /SCRIPT LIST. Lots of cleanups.
filename_complete() has extra argument for "default directory" which is
searched if no path is given when completing.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1680 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/perl/perl-core.h')
-rw-r--r-- | src/perl/perl-core.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/perl/perl-core.h b/src/perl/perl-core.h new file mode 100644 index 00000000..db607031 --- /dev/null +++ b/src/perl/perl-core.h @@ -0,0 +1,38 @@ +#ifndef __PERL_CORE_H +#define __PERL_CORE_H + +typedef struct { + char *name; /* unique name */ + char *package; /* package name */ + + /* Script can be loaded from a file, or from some data in memory */ + char *path; /* FILE: full path for file */ + char *data; /* DATA: data used for the script */ +} PERL_SCRIPT_REC; + +extern GSList *perl_scripts; + +/* Initialize perl interpreter */ +void perl_scripts_init(void); +/* Destroy all perl scripts and deinitialize perl interpreter */ +void perl_scripts_deinit(void); + +/* Load a perl script, path must be a full path. */ +PERL_SCRIPT_REC *perl_script_load_file(const char *path); +/* Load a perl script from given data */ +PERL_SCRIPT_REC *perl_script_load_data(const char *data); +/* Unload perl script */ +void perl_script_unload(PERL_SCRIPT_REC *script); + +/* Find loaded script by name */ +PERL_SCRIPT_REC *perl_script_find(const char *name); +/* Find loaded script by package */ +PERL_SCRIPT_REC *perl_script_find_package(const char *package); + +/* Returns full path for the script */ +char *perl_script_get_path(const char *name); + +void perl_core_init(void); +void perl_core_deinit(void); + +#endif |