Develop and Download Open Source Software

Browse CVS Repository

Diff of /shiki/shiki/xyzzylisp.c

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.10 by aloha, Wed Nov 29 04:37:23 2006 UTC revision 1.11 by aloha, Wed Nov 29 14:58:27 2006 UTC
# Line 6  Line 6 
6  #define SCM_CGEN_CONST const  #define SCM_CGEN_CONST const
7  #endif  #endif
8  #include "shiki.h"  #include "shiki.h"
9    static SCM_DEFINE_STRING_CONST(xyzzylisp__2aindent_width_2a__VAR__NAME, "*indent-width*", 14, 14);
10    static ScmObj xyzzylisp__2aindent_width_2a__VAR = SCM_UNBOUND;
11    static SCM_DEFINE_STRING_CONST(xyzzylisp__2amode_line_format_2a__VAR__NAME, "*mode-line-format*", 18, 18);
12    static ScmObj xyzzylisp__2amode_line_format_2a__VAR = SCM_UNBOUND;
13  static ScmObj xyzzylisp_bufferp(ScmObj *SCM_FP, int SCM_ARGCNT, void *data_)  static ScmObj xyzzylisp_bufferp(ScmObj *SCM_FP, int SCM_ARGCNT, void *data_)
14  {  {
15    ScmObj buffer_scm;    ScmObj buffer_scm;
# Line 738  SCM_RETURN(SCM_OBJ_SAFE(SCM_RESULT)); Line 742  SCM_RETURN(SCM_OBJ_SAFE(SCM_RESULT));
742  static SCM_DEFINE_STRING_CONST(xyzzylisp_msgbox__NAME, "msgbox", 6, 6);  static SCM_DEFINE_STRING_CONST(xyzzylisp_msgbox__NAME, "msgbox", 6, 6);
743  static SCM_DEFINE_SUBR(xyzzylisp_msgbox__STUB, 1, 1, SCM_OBJ(&xyzzylisp_msgbox__NAME), xyzzylisp_msgbox, NULL, NULL);  static SCM_DEFINE_SUBR(xyzzylisp_msgbox__STUB, 1, 1, SCM_OBJ(&xyzzylisp_msgbox__NAME), xyzzylisp_msgbox, NULL, NULL);
744    
745    static ScmObj xyzzylisp_current_line_number(ScmObj *SCM_FP, int SCM_ARGCNT, void *data_)
746    {
747      SCM_ENTER_SUBR("current-line-number");
748      {
749    {
750    int SCM_RESULT;
751      GtkTextIter p;
752      gtk_text_buffer_get_iter_at_mark(Shiki_CURRENT_TEXT_BUFFER,&p, gtk_text_buffer_get_insert(Shiki_CURRENT_TEXT_BUFFER));
753      SCM_RESULT = gtk_text_iter_get_line(&p) + 1;
754    SCM_RETURN(Scm_MakeInteger(SCM_RESULT));
755    }
756      }
757    }
758    
759    static SCM_DEFINE_STRING_CONST(xyzzylisp_current_line_number__NAME, "current-line-number", 19, 19);
760    static SCM_DEFINE_SUBR(xyzzylisp_current_line_number__STUB, 0, 0, SCM_OBJ(&xyzzylisp_current_line_number__NAME), xyzzylisp_current_line_number, NULL, NULL);
761    
762    static ScmObj xyzzylisp_current_column(ScmObj *SCM_FP, int SCM_ARGCNT, void *data_)
763    {
764      SCM_ENTER_SUBR("current-column");
765      {
766    {
767    int SCM_RESULT;
768      GtkTextIter p;
769      gtk_text_buffer_get_iter_at_mark(Shiki_CURRENT_TEXT_BUFFER,&p, gtk_text_buffer_get_insert(Shiki_CURRENT_TEXT_BUFFER));
770      SCM_RESULT = gtk_text_iter_get_line_offset(&p) + 1;
771    SCM_RETURN(Scm_MakeInteger(SCM_RESULT));
772    }
773      }
774    }
775    
776    static SCM_DEFINE_STRING_CONST(xyzzylisp_current_column__NAME, "current-column", 14, 14);
777    static SCM_DEFINE_SUBR(xyzzylisp_current_column__STUB, 0, 0, SCM_OBJ(&xyzzylisp_current_column__NAME), xyzzylisp_current_column, NULL, NULL);
778    
779  void Scm_Init_xyzzylisp(ScmModule *module)  void Scm_Init_xyzzylisp(ScmModule *module)
780  {  {
781    
782      xyzzylisp__2aindent_width_2a__VAR = Scm_Intern(&xyzzylisp__2aindent_width_2a__VAR__NAME);
783      Scm_Define(module, SCM_SYMBOL(SCM_OBJ(xyzzylisp__2aindent_width_2a__VAR)), SCM_MAKE_INT(2));
784      xyzzylisp__2amode_line_format_2a__VAR = Scm_Intern(&xyzzylisp__2amode_line_format_2a__VAR__NAME);
785      Scm_Define(module, SCM_SYMBOL(SCM_OBJ(xyzzylisp__2amode_line_format_2a__VAR)), SCM_FALSE);
786    SCM_DEFINE(module, "bufferp", SCM_OBJ(&xyzzylisp_bufferp__STUB));    SCM_DEFINE(module, "bufferp", SCM_OBJ(&xyzzylisp_bufferp__STUB));
787    SCM_DEFINE(module, "selected-buffer", SCM_OBJ(&xyzzylisp_selected_buffer__STUB));    SCM_DEFINE(module, "selected-buffer", SCM_OBJ(&xyzzylisp_selected_buffer__STUB));
788    SCM_DEFINE(module, "get-next-buffer", SCM_OBJ(&xyzzylisp_get_next_buffer__STUB));    SCM_DEFINE(module, "get-next-buffer", SCM_OBJ(&xyzzylisp_get_next_buffer__STUB));
# Line 777  void Scm_Init_xyzzylisp(ScmModule *modul Line 819  void Scm_Init_xyzzylisp(ScmModule *modul
819    SCM_DEFINE(module, "no-or-yes-p", SCM_OBJ(&xyzzylisp_no_or_yes_p__STUB));    SCM_DEFINE(module, "no-or-yes-p", SCM_OBJ(&xyzzylisp_no_or_yes_p__STUB));
820    SCM_DEFINE(module, "need-buffer-save-p", SCM_OBJ(&xyzzylisp_need_buffer_save_p__STUB));    SCM_DEFINE(module, "need-buffer-save-p", SCM_OBJ(&xyzzylisp_need_buffer_save_p__STUB));
821    SCM_DEFINE(module, "msgbox", SCM_OBJ(&xyzzylisp_msgbox__STUB));    SCM_DEFINE(module, "msgbox", SCM_OBJ(&xyzzylisp_msgbox__STUB));
822      SCM_DEFINE(module, "current-line-number", SCM_OBJ(&xyzzylisp_current_line_number__STUB));
823      SCM_DEFINE(module, "current-column", SCM_OBJ(&xyzzylisp_current_column__STUB));
824  }  }

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26