/[hurd]/hurd/term/main.c
ViewVC logotype

Diff of /hurd/term/main.c

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

revision 1.26 by marcus, Sun Feb 10 18:33:10 2002 UTC revision 1.27 by marcus, Tue Mar 5 02:17:04 2002 UTC
# Line 1  Line 1 
1  /*  /* main.c - A translator that emulates a terminal.
2     Copyright (C) 1995, 1996, 1997, 2000, 2002 Free Software Foundation, Inc.     Copyright (C) 1995, 1996, 1997, 2000, 2002 Free Software Foundation, Inc.
3     Written by Michael I. Bushnell, p/BSG.     Written by Michael I. Bushnell, p/BSG.
4    
# Line 84  parse_opt (int opt, char *arg, struct ar Line 84  parse_opt (int opt, char *arg, struct ar
84                    
85          rdev = strtoul (start, &end, 0);          rdev = strtoul (start, &end, 0);
86          if (*end == ',')          if (*end == ',')
           /* MAJOR,MINOR form */  
87            {            {
88                /* MAJOR,MINOR form.  */
89              start = end;              start = end;
90              rdev = (rdev << 8) + strtoul (start, &end, 0);              rdev = (rdev << 8) + strtoul (start, &end, 0);
91            }            }
# Line 206  main (int argc, char **argv) Line 206  main (int argc, char **argv)
206    
207      default:      default:
208        /* Should not happen.  */        /* Should not happen.  */
209        fprintf (stderr, "Unknown terminal type is unknown.\n");        fprintf (stderr, "Unknown terminal type\n");
210        exit (1);        exit (1);
211      }      }
212        
# Line 218  main (int argc, char **argv) Line 218  main (int argc, char **argv)
218        exit (1);        exit (1);
219      }      }
220    
221    /* Set our node */    /* Set our node.  */
222    errno = trivfs_startup (bootstrap, 0,    errno = trivfs_startup (bootstrap, 0,
223                            ourcntlclass, term_bucket, ourclass, term_bucket,                            ourcntlclass, term_bucket, ourclass, term_bucket,
224                            ourcntl);                            ourcntl);
# Line 232  main (int argc, char **argv) Line 232  main (int argc, char **argv)
232       the hook to store the nodename.  */       the hook to store the nodename.  */
233    (*ourcntl)->hook = tty_name;    (*ourcntl)->hook = tty_name;
234    
235    /* Set peer */    /* Set peer.  */
236    if (peerclass)    if (peerclass)
237      {      {
238        char *peer_name = tty_arg;        char *peer_name = tty_arg;
# Line 262  main (int argc, char **argv) Line 262  main (int argc, char **argv)
262        ports_port_deref (*peercntl);        ports_port_deref (*peercntl);
263      }      }
264    
265    bzero (&termstate, sizeof (termstate));    memset (&termstate, 0, sizeof (termstate));
266    termflags = NO_CARRIER | NO_OWNER;    termflags = NO_CARRIER | NO_OWNER;
267    mutex_init (&global_lock);    mutex_init (&global_lock);
268    
# Line 301  main (int argc, char **argv) Line 301  main (int argc, char **argv)
301    condition_implies (inputq->wait, &select_alert);    condition_implies (inputq->wait, &select_alert);
302    condition_implies (outputq->wait, &select_alert);    condition_implies (outputq->wait, &select_alert);
303    
304    /* Launch */    /* Launch.  */
305    ports_manage_port_operations_multithread (term_bucket, demuxer, 0, 0, 0);    ports_manage_port_operations_multithread (term_bucket, demuxer, 0, 0, 0);
306    
307    return 0;    return 0;

Legend:
Removed from v.1.26  
changed lines
  Added in v.1.27

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26