~ubuntu-branches/debian/sid/geany-plugins/sid

« back to all changes in this revision

Viewing changes to geanylua/glspi_sci.c

  • Committer: Bazaar Package Importer
  • Author(s): Evgeni Golov, Chow Loong Jin, Evgeni Golov
  • Date: 2010-09-04 23:05:00 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20100904230500-4n99m507u6drouv5
Tags: 0.19-1
[ Chow Loong Jin ]
* New upstream release
  + Builds against geany 0.19 (Closes: #590346, #587141)
* debian/control, debian/rules:
  + Shift geany dependency to geany-plugins-common instead, since it's a
    common dependency for all plugins
* debian/control:
  + Add new packages for codenav, extrasel, gendoc, insertnum,
    prettyprinter and treebrowser plugins
  + Update build-deps:
    - Bump geany dependency to 0.19. (Closes: #573318)
    - Add libctpl-dev and python-docutils for geanygendoc
    - Add libxml2-dev for prettyprinter
  + No-change bump of Standards-Version from 3.8.3 to 3.9.0
  + Tighten dependency on geany-plugins-common (= instead of >=)
  + Add a Breaks on all geany-plugin-* packages prior to this version to
    ensure geany-plugins-common and geany-plugin-* versions match
* debian/geany-plugin-codenav.{docs,install},
  debian/geany-plugin-extrasel.{docs,install},
  geany-plugin-gendoc.{docs,install},
  geany-plugin-insertnum.{docs,install},
  geany-plugin-prettyprinter.install
  geany-plugin-treebrowser.{docs,install}:
  + Install plugin files into individual packages

[ Evgeni Golov ]
* debian/control:
  + Disable the new plugins for now.
    If you want to build them localy, just uncomment them.
  + Don't D-B on libctpl-dev (it's not in Debian yet).
  + Add myself to Uploaders.
  + Standards-Version: 3.9.1
* debian/copyright:
  + Update to include latest plugins.

Show diffs side-by-side

added added

removed removed

Lines of Context:
158
158
 
159
159
 
160
160
/*
161
 
  Translate between rectangular (line/column) and linear (position) locations.
 
161
        Translate between rectangular (line/column) and linear (position) locations.
162
162
*/
163
163
static gint glspi_rowcol(lua_State* L)
164
164
{
269
269
 
270
270
 
271
271
/*
272
 
  Pushes the line of text onto the Lua stack from the specified
273
 
  line number. Return FALSE only if the index is out of bounds.
 
272
        Pushes the line of text onto the Lua stack from the specified
 
273
        line number. Return FALSE only if the index is out of bounds.
274
274
*/
275
275
static gchar* get_line_text(GeanyDocument*doc,gint linenum)
276
276
{
286
286
 
287
287
 
288
288
/*
289
 
  Lua "closure" function to iterate through each line in the current document
 
289
        Lua "closure" function to iterate through each line in the current document
290
290
*/
291
291
static gint lines_closure(lua_State *L)
292
292
{
312
312
{
313
313
        DOC_REQUIRED
314
314
        if (lua_gettop(L)==0) {
315
 
          push_number(L,0);
 
315
                push_number(L,0);
316
316
                lua_pushlightuserdata(L,doc); /* Pass the doc pointer to our iterator */
317
 
          lua_pushcclosure(L, &lines_closure, 2);
318
 
          return 1;
 
317
                lua_pushcclosure(L, &lines_closure, 2);
 
318
                return 1;
319
319
        } else {
320
320
                int idx;
321
321
                gchar *text;
425
425
        if ( SCI_NULL == scicmd ) {
426
426
                lua_pushfstring(
427
427
                        L, _( "Error in module \"%s\" at function navigate():\n"
428
 
                                          "unknown navigation mode \"%s\" for argument #1.\n"),
 
428
                                                "unknown navigation mode \"%s\" for argument #1.\n"),
429
429
                                                LUA_MODULE_NAME, strcmd);
430
430
                lua_error(L);
431
431
        } else {
599
599
static gint glspi_fail_not_implemented(lua_State* L, const gchar*funcname, gchar*cmdname)
600
600
{
601
601
        lua_pushfstring(
602
 
                        L, _( "Error in module \"%s\" at function %s():\n"
603
 
                                                "API command \"%s\" not implemented.\n"),
604
 
                                                 LUA_MODULE_NAME, &funcname[6], cmdname);
 
602
                L, _( "Error in module \"%s\" at function %s():\n"
 
603
                        "API command \"%s\" not implemented.\n"),
 
604
                LUA_MODULE_NAME, &funcname[6], cmdname);
605
605
        lua_error(L);
606
606
        return 0;
607
607
}
610
610
static gint glspi_fail_arg_count(lua_State* L, const gchar*funcname, gchar*cmdname)
611
611
{
612
612
        lua_pushfstring(
613
 
                        L, _( "Error in module \"%s\" at function %s():\n"
614
 
                                                "not enough arguments for command \"%s\".\n"),
615
 
                                                 LUA_MODULE_NAME, &funcname[6], cmdname);
 
613
                L, _( "Error in module \"%s\" at function %s():\n"
 
614
                        "not enough arguments for command \"%s\".\n"),
 
615
                LUA_MODULE_NAME, &funcname[6], cmdname);
616
616
        lua_error(L);
617
617
        return 0;
618
618
}
644
644
                        strncpy(cmdbuf,lua_tostring(L,1),sizeof(cmdbuf)-1);
645
645
                        for (i=0;cmdbuf[i];i++) {cmdbuf[i]=g_ascii_toupper(cmdbuf[i]);}
646
646
                        he=lookup_cmd_str((strncmp(cmdbuf,"SCI_",4)==0)?&cmdbuf[4]:cmdbuf);
647
 
          } else { return FAIL_STRING_ARG(1); }
 
647
                } else { return FAIL_STRING_ARG(1); }
648
648
        }
649
649
        if ( !he ) {
650
650
                lua_pushfstring(
651
651
                        L, _( "Error in module \"%s\" at function %s():\n"
652
 
                                                "unknown command \"%s\" given for argument #1.\n"),
653
 
                                                 LUA_MODULE_NAME, &__FUNCTION__[6], lua_tostring(L,1));
 
652
                                "unknown command \"%s\" given for argument #1.\n"),
 
653
                        LUA_MODULE_NAME, &__FUNCTION__[6], lua_tostring(L,1));
654
654
                lua_error(L);
655
655
                return 0;
656
656
        }
725
725
                                lua_pushnil(L);
726
726
                                return 1;
727
727
                        }
728
 
                  break;
 
728
                        break;
729
729
                case SLT_FINDTEXT: return FAIL_API;
730
730
                case SLT_FORMATRANGE: return FAIL_API;
731
731
                default:return FAIL_API;
792
792
                        } else {
793
793
                                lua_pushfstring(L, _("Error in module \"%s\" at function %s():\n"
794
794
                                        " invalid table in argument #%d:\n"
795
 
                                        "  unknown flag \"%s\" for element #%d\n "),
 
795
                                        " unknown flag \"%s\" for element #%d\n"),
796
796
                                        LUA_MODULE_NAME, &__FUNCTION__[6], 4,
797
797
                                        (strlen(flagname)>64)?_("<too large to display>"):flagname, i);
798
798
                                lua_error(L);