Utah Raster Toolkit  9999-git
URT Development version (post-3.1b)
Macros | Functions | Variables
gettaac.c File Reference
#include <errno.h>
#include <stdio.h>
#include <strings.h>
#include <signal.h>
#include <suntool/sunview.h>
#include <suntool/panel.h>
#include <suntool/canvas.h>
#include <sunwindow/win_cursor.h>
#include <sunwindow/notify.h>
#include <sys/types.h>
#include <sys/dir.h>
#include <sys/file.h>
#include <pwd.h>
#include "rle.h"
#include <sys/stat.h>
#include <taac1/taio.h>
#include "gettaac.icon"
Include dependency graph for gettaac.c:

Go to the source code of this file.

Macros

#define MAX_FILE_NAME   1024
 
#define FONT   "/usr/lib/fonts/fixedwidthfonts/serif.r.14"
 
#define NCMAP   256
 
#define X_PIXELS   512 /* number of x pixels */
 
#define Y_PIXELS   480 /* number of y pixels */
 
#define RGB   0
 
#define GRAY   1
 

Functions

static void init_panel ()
 
static void doexit ()
 
static void read_file ()
 
static void format_select ()
 
static void make_new_name ()
 
static void init_color_map ()
 
static void bw_init_colors ()
 
static void init_canvas ()
 
 DEFINE_ICON_FROM_IMAGE (gettaac_icon, icon_image)
 
static void read_file_rgb ()
 
static void read_file_gray ()
 
static void read_file_bw ()
 
static Notify_value taac_interposer ()
 
 main (int argc, char **argv)
 
static void init_panel (Frame base_frame)
 
static void read_file_rgb (rle_hdr *hdr)
 
static void read_file_gray (rle_hdr *hdr)
 
static void format_select (Panel_item item, int value, Event *event)
 
static void make_new_name (Panel_item item, Event *event)
 
int complete (char *template)
 
 get_full_path (template, full_path)
 

Variables

static char sccsid []
 
static Frame base_frame
 
static Canvas canvas
 
static Pixwin * pw
 
static Cursor cursor
 
static Panel panel
 
static Panel_item file_name
 
static Panel_item gamma_item
 
static struct pixfont * pixfont
 
static unsigned intscan_line_buffer
 
static char * my_name
 
static short icon_image []
 
static unsigned char red [256]
 
static unsigned char green [256]
 
static unsigned char blue [256]
 
static int display_mode = 0
 
TA_HANDLE * tahandle
 
static int erase [512]
 

Macro Definition Documentation

#define FONT   "/usr/lib/fonts/fixedwidthfonts/serif.r.14"

Definition at line 45 of file gettaac.c.

#define GRAY   1

Definition at line 89 of file gettaac.c.

#define MAX_FILE_NAME   1024

Definition at line 44 of file gettaac.c.

#define NCMAP   256

Definition at line 46 of file gettaac.c.

#define RGB   0

Definition at line 88 of file gettaac.c.

#define X_PIXELS   512 /* number of x pixels */

Definition at line 47 of file gettaac.c.

#define Y_PIXELS   480 /* number of y pixels */

Definition at line 48 of file gettaac.c.

Function Documentation

static void bw_init_colors ( )
static
int complete ( char *  template)

Definition at line 450 of file gettaac.c.

452 {
453 
454  char dirName[255];
455  char *prefix;
456  int pref_len;
457  char *suffix;
458  char *p, *q;
459  char first;
460  char nonUnique;
461  char twiddleUserCompletion;
462 
463  struct direct *nameEntry;
464  DIR *dirChan;
465  struct passwd *pwdEntry;
466 
467  /*
468  * First do a little parsing of the input. Separate the
469  * prefix template from the directory if there is one.
470  */
471  twiddleUserCompletion= 0;
472  prefix= template+strlen(template);
473  while (*(--prefix) != '/' && prefix >= template);
474 
475  /*
476  * See if a directory was specified:
477  */
478  if (prefix < template) {
479  /*
480  * No /'s, could be either a username completion or
481  * a completion in the current directory.
482  */
483  if (template[0] == '~') {
484  prefix++;
485  twiddleUserCompletion= 1;
486  }
487  else {
488  strcpy(dirName, ".");
489  }
490  }
491  else if (prefix == template) {
492  /*
493  * Special case !! The directory excluding the trailing
494  * '/' is zero length. It's the root:
495  */
496  strcpy(dirName, "/");
497  }
498  else {
499  /*
500  * We're completing a file in a directory.
501  * The directory may be lead by a ~<username> abbreviation.
502  * If that's the case expand it.
503  */
504  if (template[0] == '~') {
505  /*
506  * We need to do twiddle directory expansion.
507  * See if it's our directory:
508  */
509  if (template[1] == '/') {
510  strcpy(dirName, getenv("HOME"));
511  if ( &template[1] != prefix )
512  {
513  p= dirName+strlen(dirName);
514  q= &template[1];
515  while (q < prefix) {
516  *p= *q;
517  p++, q++;
518  }
519  *p= 0;
520  }
521  }
522  else {
523  /*
524  * It's someone else's. Let our fingers
525  * do the walking. (Why the fuck do they call it
526  * the "yellow pages" anyway. They're white pages
527  * dammit ! If they were YELLOW pages, we could
528  * say ypmatch "Automobile, Dealers, Retail", and
529  * things like that !).
530  */
531  for (p= dirName, q= &template[1];
532  (*p= *q) != '/';
533  p++, q++);
534  *p= 0;
535  if (!(pwdEntry= getpwnam(dirName))) {
536  return errno;
537  }
538  strcpy(dirName, pwdEntry->pw_dir);
539  p= dirName+strlen(dirName);
540  while (q < prefix) {
541  *p= *q;
542  p++, q++;
543  }
544  *p= 0;
545  }
546  }
547  else {
548  /*
549  * It's a vanilla directory. Strip it out.
550  */
551  strncpy(dirName, template, prefix-template);
552  dirName[prefix-template]= 0;
553  }
554  }
555  /*
556  * Bump prefix past the '/'.
557  */
558  prefix++;
559 
560  /*
561  * Get the prefix length and a pointer to the end of the
562  * prefix.
563  */
564  pref_len= strlen(prefix);
565  suffix= template + strlen(template);
566 
567  /*
568  * See whether we're doing filename or username completion:
569  */
570  if (!twiddleUserCompletion) {
571 
572  /*
573  * It's filename completion. Read through the directory:
574  */
575  if ((dirChan= opendir(dirName)) == 0) {
576  return errno;
577  }
578 
579  first= 1;
580  nonUnique= 0;
581  for (;;) {
582  if (!(nameEntry= readdir(dirChan))) {
583  break;
584  }
585  if (!strncmp(prefix, nameEntry->d_name, pref_len)) {
586  /*
587  * We have a file that matches the template.
588  * If it's the first one, we fill the completion
589  * suffix with it. Otherwise we scan and pare down
590  * the suffix.
591  */
592  if (first) {
593  first= 0 ;
594  strcpy(suffix, nameEntry->d_name+pref_len);
595  }
596  else {
597  nonUnique= 1;
598  p= suffix;
599  q= nameEntry->d_name+pref_len;
600  while (*p == *q) {
601  ++p; ++q;
602  }
603  *p= 0;
604 
605  /*
606  * A little optimization: If p == suffix, we
607  * were unable to do any extension of the name.
608  * We might as well quit here.
609  */
610  if (p == suffix) {
611  break;
612  }
613  }
614  }
615  }
616 
617  closedir(dirChan);
618  }
619  else {
620  /*
621  * Do ~Username completion. Start by resetting the passwd file.
622  */
623  setpwent();
624 
625  first= 1;
626  nonUnique= 0;
627  for (;;) {
628  if (!(pwdEntry= getpwent())) {
629  break;
630  }
631  if (!strncmp(prefix, pwdEntry->pw_name, pref_len)) {
632  /*
633  * We have a user that matches the template.
634  * If it's the first one, we fill the completion
635  * suffix with it. Otherwise we scan and pare down
636  * the suffix.
637  */
638  if (first) {
639  first= 0 ;
640  strcpy(suffix, pwdEntry->pw_name+pref_len);
641  }
642  else {
643  p= suffix;
644  q= pwdEntry->pw_name+pref_len;
645  while (*p == *q) {
646  ++p; ++q;
647  }
648 
649  /*
650  * Here there is a possibility of seeing the
651  * same username twice. For this reason, we
652  * only set nonUnique to 1 if we're shortening
653  * the suffix. This means that the new name is
654  * distinct from any name we've seen.
655  */
656  if (*p) {
657  nonUnique= 1;
658  *p= 0;
659  }
660 
661  /*
662  * A little optimization: If p == suffix, we
663  * were unable to do any extension of the name.
664  * We might as well quit here.
665  */
666  if (p == suffix) {
667  break;
668  }
669  }
670  }
671  }
672  }
673 
674  /*
675  * If nothing matched, return a -1, if there was non-uniqueness
676  * return -2.
677  */
678  if (first) {
679  return -1;
680  }
681  else if (nonUnique) {
682  return -2;
683  }
684  else {
685  return 0;
686  }
687 
688 }
DEFINE_ICON_FROM_IMAGE ( gettaac_icon  ,
icon_image   
)
static void doexit ( )
static

Definition at line 216 of file gettaac.c.

217 {
218 
219  /* close the taac */
220  ta_close(tahandle);
221 
222  exit(0);
223 }
TA_HANDLE * tahandle
Definition: gettaac.c:98
static void format_select ( )
static
static void format_select ( Panel_item  item,
int  value,
Event *  event 
)
static

Definition at line 380 of file gettaac.c.

384 {
385  if (value == 0)
386  display_mode = RGB;
387  else if (value == 1)
388  display_mode = GRAY;
389  else
390  display_mode = RGB;
391 }
#define RGB
Definition: gettaac.c:88
#define GRAY
Definition: gettaac.c:89
static int display_mode
Definition: gettaac.c:91
const char * value
Definition: rleClock.c:574
get_full_path ( template  ,
full_path   
)

Definition at line 694 of file gettaac.c.

697 {
698  char *p, *q;
699  struct passwd *pwdEntry;
700  /*
701  * We're completing a file in a directory.
702  * The directory may be lead by a ~<username> abbreviation.
703  * If that's the case expand it.
704  */
705  if (template[0] == '~') {
706  /*
707  * We need to do twiddle directory expansion.
708  * See if it's our directory:
709  */
710  if (template[1] == '/') {
711  strcpy(full_path, getenv("HOME"));
712  strcat(full_path,&template[1]);
713  }
714  else {
715 
716  /*
717  * It's someone else's. Let our fingers
718  * do the walking. (Why the fuck do they call it
719  * the "yellow pages" anyway. They're white pages
720  * dammit ! If they were YELLOW pages, we could
721  * say ypmatch "Automobile, Dealers, Retail", and
722  * things like that !).
723  */
724  for (p= full_path, q= &template[1];
725  (*p= *q) != '/';
726  p++, q++);
727  *p= 0;
728  if (!(pwdEntry= getpwnam(full_path))) {
729  return errno;
730  }
731  strcpy(full_path, pwdEntry->pw_dir);
732  strcat(full_path,q);
733  }
734  }
735  else
736  strcpy(full_path,template);
737 }
static void init_canvas ( )
static
static void init_color_map ( )
static
static void init_panel ( )
static
static void init_panel ( Frame  base_frame)
static

Definition at line 159 of file gettaac.c.

161 {
162 
163  panel = window_create(base_frame, PANEL,
164  WIN_ROWS, 2,
165  PANEL_LABEL_BOLD, TRUE,
166  0);
167 
168  panel_create_item(panel, PANEL_BUTTON,
169  PANEL_ITEM_X, ATTR_COL(1),
170  PANEL_ITEM_Y, ATTR_ROW(0) + 4,
171  PANEL_LABEL_IMAGE, panel_button_image(panel, "EXIT", 4, 0),
172  PANEL_NOTIFY_PROC, doexit,
173  0);
174 
175  panel_create_item(panel, PANEL_BUTTON,
176  PANEL_ITEM_X, ATTR_COL(8),
177  PANEL_ITEM_Y, ATTR_ROW(0) + 4,
178  PANEL_LABEL_IMAGE, panel_button_image(panel, "LOAD", 4, 0),
179  PANEL_NOTIFY_PROC, read_file,
180  0);
181 
182  panel_create_item(panel, PANEL_CHOICE,
183  PANEL_ITEM_X, ATTR_COL(15),
184  PANEL_ITEM_Y, ATTR_ROW(0) + 4,
185  PANEL_CHOICE_STRINGS, "RGB", "Gray", 0,
186  PANEL_NOTIFY_PROC, format_select,
187  0);
188 
189  gamma_item = panel_create_item(panel, PANEL_TEXT,
190  PANEL_ITEM_X, ATTR_COL(30),
191  PANEL_ITEM_Y, ATTR_ROW(0) + 8,
192  PANEL_VALUE_DISPLAY_LENGTH, 4,
193  PANEL_LABEL_STRING, "Gamma:",
194  PANEL_VALUE, "1.6",
195  0);
196 
197  file_name = panel_create_item(panel, PANEL_TEXT,
198  PANEL_ITEM_X, ATTR_COL(42),
199  PANEL_ITEM_Y, ATTR_ROW(0) + 8,
200  PANEL_LABEL_STRING, "File:",
201  PANEL_VALUE_STORED_LENGTH, MAX_FILE_NAME,
202  PANEL_NOTIFY_PROC, make_new_name,
203  PANEL_VALUE_STORED_LENGTH, MAX_FILE_NAME,
204  PANEL_NOTIFY_STRING, "\033\t\r",
205  PANEL_VALUE_DISPLAY_LENGTH, 14,
206  0);
207 
208  window_set(panel, PANEL_CARET_ITEM, file_name, 0);
209 }
static Panel_item gamma_item
Definition: gettaac.c:60
static void read_file()
Definition: gettaac.c:226
static void make_new_name()
static void doexit()
Definition: gettaac.c:216
static Frame base_frame
Definition: gettaac.c:50
#define TRUE
Definition: giftorle.c:38
#define MAX_FILE_NAME
Definition: gettaac.c:44
static Panel_item file_name
Definition: gettaac.c:59
static Panel panel
Definition: gettaac.c:57
static void format_select()
main ( int  argc,
char **  argv 
)

Definition at line 102 of file gettaac.c.

105 {
106 
107  register int i;
108  struct pixrect *screen;
109 
110  my_name = cmd_name( argv );
111 
112  pixfont = pf_open(FONT);
113 
114  if (pixfont == NULL) {
115  fprintf(stderr, "Can't open the font %s\n", FONT);
116  exit(1);
117  }
118 
119  /* open the taac */
120  if((tahandle = ta_open(0))==NULL){
121  fprintf(stderr, "ta_open failed.\n");
122  exit(1);
123  }
124 
125  if (ta_init(tahandle) == TA_FAILURE) {
126  fprintf(stderr, "error initializing taac\n");
127  exit(1);
128  }
129 
130  ta_set_video(tahandle,TA_VIDEO_MIXEDTAAC,TA_SYNC_EXTERNAL);
131 
132 
133 
134  base_frame = window_create(0, FRAME,
135  FRAME_ICON, &gettaac_icon,
136  FRAME_ARGC_PTR_ARGV, &argc, argv,
137  0);
138 
140 
141 
142  canvas = window_create(base_frame, CANVAS,
143  WIN_WIDTH, X_PIXELS,
144  WIN_HEIGHT, Y_PIXELS,
145  CANVAS_AUTO_SHRINK, FALSE,
146  0);
147 
148  window_fit(base_frame);
149 
150  ta_taac_canvas(tahandle, base_frame, canvas);
151 
152  window_main_loop(base_frame);
153 
154  ta_close(tahandle);
155 
156 }
static Canvas canvas
Definition: gettaac.c:51
#define FALSE
Definition: giftorle.c:39
TA_HANDLE * tahandle
Definition: gettaac.c:98
static struct NewScreen screen
Definition: getami.c:67
static Frame base_frame
Definition: gettaac.c:50
#define Y_PIXELS
Definition: gettaac.c:48
static struct pixfont * pixfont
Definition: gettaac.c:74
#define X_PIXELS
Definition: gettaac.c:47
static void init_panel()
int i
Definition: rletorla.c:82
static char * my_name
Definition: gettaac.c:76
char * cmd_name(char **argv)
Definition: cmd_name.c:31
#define FONT
Definition: gettaac.c:45
static void make_new_name ( )
static
static void make_new_name ( Panel_item  item,
Event *  event 
)
static

Definition at line 430 of file gettaac.c.

433 {
434  static filename[MAX_FILE_NAME];
435 
436  {
437  strcpy(filename,(char*)panel_get_value(file_name));
438  if (complete(filename))
439  window_bell(panel);
440  panel_set(file_name,PANEL_VALUE,filename,0);
441  }
442 
443 }
int complete(char *template)
Definition: gettaac.c:450
#define MAX_FILE_NAME
Definition: gettaac.c:44
static Panel_item file_name
Definition: gettaac.c:59
static Panel panel
Definition: gettaac.c:57
static void read_file ( )
static

Definition at line 226 of file gettaac.c.

References display_mode, rle_hdr::rle_file, rle_get_setup_ok(), and rle_hdr_init().

227 {
228 
229  char *filename;
230  char full_path[MAX_FILE_NAME];
231  FILE *fp;
232  rle_hdr hdr;
233 
234  hdr = *rle_hdr_init( (rle_hdr *)NULL );
235 
236  filename = (char *)panel_get_value(file_name);
237 
238  rle_names( &hdr, my_name, filename );
239 
240  if (*filename == '\0') {
241  fp = stdin;
242  } else {
243  get_full_path(filename, full_path);
244  if ((fp = fopen(full_path, "r")) == NULL) {
245  fprintf(stderr, "Can't open file ->%s<-\n", full_path);
246  return;
247  }
248  }
249 
250  hdr.rle_file = fp;
251  rle_get_setup_ok( &hdr, NULL, NULL );
252 
253  if (display_mode == RGB)
254  read_file_rgb(&hdr);
255  else if (display_mode == GRAY)
256  read_file_gray(&hdr);
257  else
258  read_file_rgb(&hdr);
259 
260  fclose (hdr.rle_file);
261 }
static void read_file_rgb()
#define RGB
Definition: gettaac.c:88
static void read_file_gray()
rle_hdr hdr
Definition: iristorle.c:35
#define GRAY
Definition: gettaac.c:89
static int display_mode
Definition: gettaac.c:91
void rle_names(rle_hdr *the_hdr, const char *pgmname, const char *fname, int img_num)
Definition: rle.h:96
#define MAX_FILE_NAME
Definition: gettaac.c:44
static Panel_item file_name
Definition: gettaac.c:59
get_full_path(template, full_path)
Definition: gettaac.c:694
FILE * fp
Definition: pgmtorle.c:49
static char * my_name
Definition: gettaac.c:76
void rle_get_setup_ok(rle_hdr *the_hdr, const char *prog_name, const char *file_name)
FILE * rle_file
Definition: rle.h:114
rle_hdr * rle_hdr_init(rle_hdr *the_hdr)
Definition: rle_hdr.c:267

Here is the call graph for this function:

static void read_file_bw ( )
static
static void read_file_gray ( )
static
static void read_file_gray ( rle_hdr hdr)
static

Definition at line 322 of file gettaac.c.

324 {
325 
326  unsigned char *scan[3];
327  register unsigned char *r, *g, *b;
328  register int x, value;
329  unsigned char *map;
330  rle_pixel **in_cmap;
331  double gamma;
332  int x_size, y_size, y;
333  int i;
334 
335 
336  RLE_CLR_BIT(*hdr, RLE_ALPHA);
337 
338  x_size = (hdr->xmax - hdr->xmin + 1);
339  y_size = (hdr->ymax - hdr->ymin + 1);
340 
341  /* get memory for the scan line data */
342  for (i = 0; i < 3; i++)
343  scan[i] = (unsigned char *) malloc(x_size);
344 
345  hdr->xmax -= hdr->xmin;
346  hdr->xmin = 0;
347 
348  if (sscanf((char *)panel_get_value(gamma_item), "%lf", &gamma) != 1)
349  gamma = 1.0;
350 
351  in_cmap = buildmap( hdr, 1, 1.0 / gamma, 1.0 );
352 
353  map = &(in_cmap[0][0]);
354 
355  /* get memory for the output buffer */
356  scan_line_buffer = (unsigned int *) malloc(x_size * sizeof(unsigned int));
357 
358  for ( i = 0; i < Y_PIXELS; i++)
359  ta_write2d(tahandle, erase, X_PIXELS, 1, 0, i);
360 
361  while ( (y = rle_getrow( hdr, scan )) <= hdr->ymax ) {
362  for(x = 0, r = scan[0], g = scan[1], b = scan[2];
363  x < x_size; x++, r++, g++, b++) {
364  value = (35*(*r)+55*(*g)+10*(*b)) / 100;
365  value = map[value];
366  scan_line_buffer[x] = value + (value << 8) + (value << 16);
367  }
368  /* XXX min ? */
369  ta_write2d(tahandle, scan_line_buffer, min(x_size, 1024), 1, 0, y_size - y);
370 
371  }
372 
373  /* be neat and free memory */
374  free(scan_line_buffer);
375  for (i = 0; i < 3; i++)
376  free(scan[i]);
377 }
static unsigned char g
Definition: getami.c:692
int xmin
Definition: rle.h:100
static Panel_item gamma_item
Definition: gettaac.c:60
int y_size
Definition: get4d.c:28
static unsigned char r
Definition: getami.c:692
rle_pixel ** in_cmap
Definition: getsun.c:63
TA_HANDLE * tahandle
Definition: gettaac.c:98
short map[3][256]
Definition: getap.c:115
int ymin
Definition: rle.h:100
static int y
Definition: getami.c:691
unsigned char ** scan
Definition: rle.c:26
#define Y_PIXELS
Definition: gettaac.c:48
static unsigned char b
Definition: getami.c:692
#define X_PIXELS
Definition: gettaac.c:47
int xmax
Definition: rle.h:100
static int x
Definition: getami.c:691
static int erase[512]
Definition: gettaac.c:99
static unsigned int * scan_line_buffer
Definition: gettaac.c:75
#define min(a, b)
Definition: dvirle.h:51
int x_size
Definition: get4d.c:28
int gamma(int x, float gamma_value)
Definition: gamma.c:24
#define RLE_CLR_BIT(glob, bit)
Definition: rle.h:124
int ymax
Definition: rle.h:100
rle_pixel ** buildmap(rle_hdr *the_hdr, int minmap, double orig_gamma, double new_gamma)
Definition: buildmap.c:56
unsigned char rle_pixel
Definition: rle.h:56
void * malloc()
int i
Definition: rletorla.c:82
#define RLE_ALPHA
Definition: rle.h:65
const char * value
Definition: rleClock.c:574
int rle_getrow(rle_hdr *the_hdr, rle_pixel *scanline[])
static void read_file_rgb ( )
static
static void read_file_rgb ( rle_hdr hdr)
static

Definition at line 264 of file gettaac.c.

266 {
267 
268  unsigned char *scan[3];
269  register unsigned char *r, *g, *b;
270  register int x, y;
271  unsigned char *rmap, *gmap, *bmap;
272  rle_pixel **in_cmap;
273  double gamma;
274  int x_size, y_size;
275  int i;
276 
277  RLE_CLR_BIT(*hdr, RLE_ALPHA);
278 
279  x_size = (hdr->xmax - hdr->xmin + 1);
280  y_size = (hdr->ymax - hdr->ymin + 1);
281 
282  /* get memory for the scan line data */
283  for (i = 0; i < 3; i++)
284  scan[i] = (unsigned char *) malloc(x_size);
285 
286  hdr->xmax -= hdr->xmin;
287  hdr->xmin = 0;
288 
289  if (sscanf((char *)panel_get_value(gamma_item), "%lf", &gamma) != 1)
290  gamma = 1.0;
291 
292  in_cmap = buildmap( hdr, 3, 1.0 / gamma, 1.0 );
293 
294  rmap = &(in_cmap[0][0]);
295  gmap = &(in_cmap[1][0]);
296  bmap = &(in_cmap[2][0]);
297 
298 
299  /* get memory for the output buffer */
300  scan_line_buffer = (unsigned int *) malloc(x_size * sizeof(unsigned int));
301 
302 
303  for ( i = 0; i < Y_PIXELS; i++)
304  ta_write2d(tahandle, erase, X_PIXELS, 1, 0, i);
305 
306  while ( (y = rle_getrow( hdr, scan )) <= hdr->ymax ) {
307  for(x = 0, r = scan[0], g = scan[1], b = scan[2];
308  x < x_size; x++, r++, g++, b++) {
309  scan_line_buffer[x] = rmap[*r] + (gmap[*g] << 8) + (bmap[*b] << 16);
310  }
311  /* XXX min ? */
312  ta_write2d(tahandle, scan_line_buffer, min(x_size, 1024), 1, 0, y_size - y);
313  }
314 
315  /* be neat and free memory */
316  free(scan_line_buffer);
317  for (i = 0; i < 3; i++)
318  free(scan[i]);
319 }
static unsigned char g
Definition: getami.c:692
int xmin
Definition: rle.h:100
rle_pixel ** rmap
Definition: rlestereo.c:58
static Panel_item gamma_item
Definition: gettaac.c:60
int y_size
Definition: get4d.c:28
static unsigned char r
Definition: getami.c:692
rle_pixel ** in_cmap
Definition: getsun.c:63
TA_HANDLE * tahandle
Definition: gettaac.c:98
int ymin
Definition: rle.h:100
static int y
Definition: getami.c:691
unsigned char ** scan
Definition: rle.c:26
#define Y_PIXELS
Definition: gettaac.c:48
static unsigned char b
Definition: getami.c:692
#define X_PIXELS
Definition: gettaac.c:47
int xmax
Definition: rle.h:100
static int x
Definition: getami.c:691
static int erase[512]
Definition: gettaac.c:99
static unsigned int * scan_line_buffer
Definition: gettaac.c:75
#define min(a, b)
Definition: dvirle.h:51
int x_size
Definition: get4d.c:28
int gamma(int x, float gamma_value)
Definition: gamma.c:24
#define RLE_CLR_BIT(glob, bit)
Definition: rle.h:124
int ymax
Definition: rle.h:100
rle_pixel ** buildmap(rle_hdr *the_hdr, int minmap, double orig_gamma, double new_gamma)
Definition: buildmap.c:56
unsigned char rle_pixel
Definition: rle.h:56
void * malloc()
int i
Definition: rletorla.c:82
#define RLE_ALPHA
Definition: rle.h:65
int rle_getrow(rle_hdr *the_hdr, rle_pixel *scanline[])
static Notify_value taac_interposer ( )
static

Variable Documentation

Frame base_frame
static

Definition at line 50 of file gettaac.c.

unsigned char blue[256]
static

Definition at line 86 of file gettaac.c.

Canvas canvas
static

Definition at line 51 of file gettaac.c.

Cursor cursor
static

Definition at line 53 of file gettaac.c.

int display_mode = 0
static

Definition at line 91 of file gettaac.c.

Referenced by read_file().

int erase[512 ]
static

Definition at line 99 of file gettaac.c.

Panel_item file_name
static

Definition at line 59 of file gettaac.c.

Panel_item gamma_item
static

Definition at line 60 of file gettaac.c.

unsigned char green[256]
static

Definition at line 85 of file gettaac.c.

short icon_image[]
static

Definition at line 78 of file gettaac.c.

char* my_name
static

Definition at line 76 of file gettaac.c.

Panel panel
static

Definition at line 57 of file gettaac.c.

struct pixfont* pixfont
static

Definition at line 74 of file gettaac.c.

Pixwin* pw
static

Definition at line 52 of file gettaac.c.

unsigned char red[256]
static

Definition at line 84 of file gettaac.c.

unsigned int* scan_line_buffer
static

Definition at line 75 of file gettaac.c.

char sccsid[]
static
Initial value:
= "@(#)gettaac.c 1.2 7/5/90 Copyright (c) 1989, 1990\
by Southwest Research Institute, San Antonio, Texas"

Definition at line 2 of file gettaac.c.

TA_HANDLE* tahandle

Definition at line 98 of file gettaac.c.