Changeset 58d47ca


Ignore:
Timestamp:
Mar 29, 2010, 11:11:32 PM (14 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, release-1.10, release-1.6, release-1.7, release-1.8, release-1.9
Children:
98d296d
Parents:
73eda8c
git-author:
Nelson Elhage <nelhage@ksplice.com> (03/19/10 17:02:20)
git-committer:
Nelson Elhage <nelhage@mit.edu> (03/29/10 23:11:32)
Message:
Make owl_global_set_typwin-active return the new editwin.

This makes the code to set up a new edit window slightly more compact,
and removes references to the single global editwin.
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • functions.c

    rf25812b r58d47ca  
    283283
    284284  /* create and setup the editwin */
    285   owl_global_set_typwin_active(&g, OWL_EDITWIN_STYLE_MULTILINE,
    286                                owl_global_get_msg_history(&g));
    287   e = owl_global_get_typwin(&g);
     285  e = owl_global_set_typwin_active(&g, OWL_EDITWIN_STYLE_MULTILINE,
     286                                   owl_global_get_msg_history(&g));
    288287  owl_editwin_set_dotsend(e);
    289288  s = owl_sprintf("----> %s\n", line);
     
    19161915  owl_editwin *tw;
    19171916
    1918   owl_global_set_typwin_active(&g, OWL_EDITWIN_STYLE_ONELINE, owl_global_get_cmd_history(&g));
    1919   tw=owl_global_get_typwin(&g);
     1917  tw = owl_global_set_typwin_active(&g, OWL_EDITWIN_STYLE_ONELINE, owl_global_get_cmd_history(&g));
    19201918
    19211919  owl_editwin_set_locktext(tw, "command: ");
     
    19331931  owl_editwin *tw;
    19341932
    1935   owl_global_set_typwin_active(&g, OWL_EDITWIN_STYLE_ONELINE, owl_global_get_cmd_history(&g));
    1936   tw=owl_global_get_typwin(&g);
     1933  tw = owl_global_set_typwin_active(&g, OWL_EDITWIN_STYLE_ONELINE, owl_global_get_cmd_history(&g));
    19371934
    19381935  owl_editwin_set_locktext(tw, line);
     
    19481945  owl_editwin *tw;
    19491946
    1950   owl_global_set_typwin_active(&g, OWL_EDITWIN_STYLE_ONELINE, NULL);
    1951   tw = owl_global_get_typwin(&g);
     1947  tw = owl_global_set_typwin_active(&g, OWL_EDITWIN_STYLE_ONELINE, NULL);
     1948
    19521949  owl_editwin_set_echochar(tw, '*');
    19531950
  • global.c

    r73eda8c r58d47ca  
    371371}
    372372
    373 void owl_global_set_typwin_active(owl_global *g, int style, owl_history *hist) {
     373owl_editwin *owl_global_set_typwin_active(owl_global *g, int style, owl_history *hist) {
    374374  int d;
    375375  d = owl_global_get_typewindelta(g);
     
    383383                          hist);
    384384  g->typwinactive=1;
     385  return g->tw;
    385386}
    386387
Note: See TracChangeset for help on using the changeset viewer.