IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 27, 2005, 3:23:01 PM (21 years ago)
Author:
eugene
Message:

substantial work to move kii/kapa call into libkapa, unify RotFont, bDraw functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/kii/setup/DefineLayout.c

    r5700 r5852  
    55void DefineLayout (Layout *layout, Graphic *graphic, int argc, char **argv) {
    66
    7   int i, status, N;
    8   struct sockaddr_un Address;
    9   char temp[100], *temp_name;
     7  int i, N;
     8  char *colormap;
    109
    1110  /** initiate connection with mana **/
    12   if (!DEBUG) {
     11  if (!FOREGROUND) {
    1312    if (argc < 2) {
    1413      fprintf (stderr, "socket path not specified\n");
    1514      exit (0);
    1615    }
    17     strcpy (Address.sun_path, argv[1]);
    18     Address.sun_family = AF_UNIX;
    19     layout[0].Ximage = socket (AF_UNIX, SOCK_STREAM, 0);
    20     status = connect (layout[0].Ximage, (struct sockaddr *) &Address, (socklen_t) sizeof (Address));
    21     if (status < 0) {
    22       fprintf (stderr, "kii - unsuccessful connection: %d\n", status);
    23       exit (0);
    24     }
    25     fcntl (layout[0].Ximage, F_SETFL, O_NONBLOCK); 
    26     sprintf (temp, "rm -f %s", argv[1]);
    27     system (temp);
     16    layout[0].Ximage = KiiWait (argv[1]);
    2817  }
    2918
     
    3423    MakeColormap (graphic, layout, argc, argv);
    3524  } else {
    36     temp_name = default_colormap;
     25    colormap = default_colormap;
    3726    if ((N = get_argument (argc, argv, "-cm"))) {
    3827      remove_argument (N, &argc, argv);
    39       temp_name = argv[N];
     28      colormap = argv[N];
    4029    }
    4130    layout[0].Npixels = 256;
    42     SetColormap (graphic, layout, temp_name);
     31    SetColormap (graphic, layout, colormap);
    4332  }
    4433
     
    7059}
    7160
    72 
    7361/* this routine is independent of the number of overlays */
    7462
    7563  /* cmap = the mapping of value to color in kii
    7664     colormap = the set of pixel -> color representation in X */
    77 
Note: See TracChangeset for help on using the changeset viewer.