Changeset 5700 for trunk/Ohana/src/kii/setup/DefineLayout.c
- Timestamp:
- Dec 5, 2005, 3:55:45 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/kii/setup/DefineLayout.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/kii/setup/DefineLayout.c
r5637 r5700 1 1 # include "Ximage.h" 2 3 static char default_colormap[] = "grayscale"; 2 4 3 5 void DefineLayout (Layout *layout, Graphic *graphic, int argc, char **argv) { … … 5 7 int i, status, N; 6 8 struct sockaddr_un Address; 7 char temp[100] ;9 char temp[100], *temp_name; 8 10 9 11 /** initiate connection with mana **/ … … 29 31 30 32 /* get the display colors */ 31 MakeColormap (graphic, layout, argc, argv); 33 if (USE_XWINDOW) { 34 MakeColormap (graphic, layout, argc, argv); 35 } else { 36 temp_name = default_colormap; 37 if ((N = get_argument (argc, argv, "-cm"))) { 38 remove_argument (N, &argc, argv); 39 temp_name = argv[N]; 40 } 41 layout[0].Npixels = 256; 42 SetColormap (graphic, layout, temp_name); 43 } 32 44 33 45 /** set up a bunch of default things **/ … … 51 63 ALLOCATE (layout[0].zoom.data, char, 1); /* allocate so later free will not crash! */ 52 64 53 CreatePicture (layout, graphic); 54 CreateColorbar (layout, graphic); 55 CreateZoom (layout, graphic, 0, 0); 65 if (USE_XWINDOW) { 66 CreatePicture (layout, graphic); 67 CreateColorbar (layout, graphic); 68 CreateZoom (layout, graphic, 0, 0); 69 } 56 70 } 57 71
Note:
See TracChangeset
for help on using the changeset viewer.
