File: plugin.mpi

package info (click to toggle)
madoka 4.1.15-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 792 kB
  • ctags: 43
  • sloc: perl: 1,140; makefile: 42
file content (26 lines) | stat: -rw-r--r-- 608 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# madoka 4.0 rc_plugin
#
# rc/plugin.mpi
#    Copyright(c)1998- cookie / The madoka project
#

local($var, $arg) = split(/=\s*/, $rc_line, 2);

if ($var eq 'dir') {
  $arg =~ s/^~\//$homedir\//;
  if (-d $arg) {
    push(@plugindir, $arg);
  } else {
    &down("[ERROR] not a directory: $arg in [plugin]\n");
  }
} else {
  local($file) = &search_file($arg);
  &down("[ERROR] no such file or cannot read: $file in [plugin]\n")
    unless (-r $file && -f $file);
  if ($var eq 'main') {
    &list_add($plugin_do, $file);
  } elsif ($var eq 'sub') {
    &list_add($plugin_redo, $file);
    &redo($file);
  }
}