/[gxemul]/trunk/src/console.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/src/console.c

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

revision 10 by dpavlin, Mon Oct 8 16:18:27 2007 UTC revision 20 by dpavlin, Mon Oct 8 16:19:23 2007 UTC
# Line 25  Line 25 
25   *  SUCH DAMAGE.   *  SUCH DAMAGE.
26   *   *
27   *   *
28   *  $Id: console.c,v 1.9 2005/06/26 11:36:27 debug Exp $   *  $Id: console.c,v 1.10 2005/11/23 02:17:00 debug Exp $
29   *   *
30   *  Generic console support functions.   *  Generic console support functions.
31   *   *
# Line 774  void console_allow_slaves(int allow) Line 774  void console_allow_slaves(int allow)
774  }  }
775    
776    
777    /*
778     *  console_are_slaves_allowed():
779     *
780     *  Returns the value of allow_slaves.
781     */
782    int console_are_slaves_allowed(void)
783    {
784            return allow_slaves;
785    }
786    
787    
788    /*
789     *  console_warn_if_slaves_are_needed():
790     *
791     *  Prints a warning if slave xterms are needed (i.e. there is more than one
792     *  console handle in use), but they are not currently allowed.
793     */
794    void console_warn_if_slaves_are_needed(void)
795    {
796            int i, n = 0;
797            for (i=MAIN_CONSOLE+1; i<n_console_handles; i++)
798                    if (console_handles[i].in_use &&
799                        !console_handles[i].using_xterm)
800                            n ++;
801    
802            if (!allow_slaves && n > 1) {
803                    fatal("#\n#  WARNING! More than one console output is in use,"
804                        "\n#  but xterm slaves are not enabled. Behaviour will\n"
805                        "#  be undefined.  (Use -x to enable slave xterms.)\n#\n");
806                    for (i=MAIN_CONSOLE+1; i<n_console_handles; i++)
807                            if (console_handles[i].in_use &&
808                                !console_handles[i].using_xterm)
809                                    fatal("#  console handle %i: '%s'\n",
810                                        i, console_handles[i].name);
811                    fatal("#\n");
812            }
813    }
814    
815    
816  /*  /*
817   *  console_init():   *  console_init():
818   *   *

Legend:
Removed from v.10  
changed lines
  Added in v.20

  ViewVC Help
Powered by ViewVC 1.1.26