Exemplo n.º 1
0
void
processScreenOrOutputArg(const char *screen_size, const char *output, char *parent_id)
{
    KdCardInfo *card;

    InitCard(0);                /*Put each screen on a separate card */
    card = KdCardInfoLast();

    if (card) {
        KdScreenInfo *screen;
        unsigned long p_id = 0;
        Bool use_geometry;

        screen = KdScreenInfoAdd(card);
        KdParseScreen(screen, screen_size);
        screen->driver = calloc(1, sizeof(EphyrScrPriv));
        if (!screen->driver)
            FatalError("Couldn't alloc screen private\n");

        if (parent_id) {
            p_id = strtol(parent_id, NULL, 0);
        }

        use_geometry = (strchr(screen_size, '+') != NULL);
        EPHYR_DBG("screen number:%d\n", screen->mynum);
        hostx_add_screen(screen, p_id, screen->mynum, use_geometry, output);
    }
    else {
        ErrorF("No matching card found!\n");
    }
}
Exemplo n.º 2
0
void
processScreenArg (char *screen_size, char *parent_id)
{
  KdCardInfo   *card;

  InitCard (0);  /*Put each screen on a separate card*/
  card = KdCardInfoLast ();

  if (card)
    {
      KdScreenInfo *screen;
      unsigned long p_id = 0;

      screen = KdScreenInfoAdd (card);
      KdParseScreen (screen, screen_size);

      if (parent_id)
        {
          p_id = strtol (parent_id, NULL, 0);
        }
      EPHYR_DBG ("screen number:%d\n", screen->mynum) ;
      hostx_add_screen (screen, p_id, screen->mynum);
    }
  else
    {
      ErrorF("No matching card found!\n");
    }
}