diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-03-28 01:28:50 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-03-28 01:28:50 +0000 |
| commit | 1593473d6e27dbfca1a5f6b2c96acc2d902a19b6 (patch) | |
| tree | 44e5d38a6fc1a1c7027bec024a3ba334f85bd422 /openbox | |
| parent | e7d225b84a2460b7483e56e102cbc35815c945c2 (diff) | |
skip comments and empty lines
Diffstat (limited to 'openbox')
| -rw-r--r-- | openbox/plugin.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/openbox/plugin.c b/openbox/plugin.c index c4a27057..ca86aca4 100644 --- a/openbox/plugin.c +++ b/openbox/plugin.c @@ -148,9 +148,13 @@ void plugin_loadall() /* load the plugins in the rc file */ while (g_io_channel_read_line(io, &name, NULL, NULL, &err) == G_IO_STATUS_NORMAL) { - g_strstrip(name); - plugin_open(name); - g_free(name); + int i = 0; + while (name[++i-1] == ' ' || name[i-1] == '\t'); + if (name[i] != '\0' && name[i] != '#') { + g_strstrip(name); + plugin_open(name); + g_free(name); + } } g_io_channel_unref(io); } |
