/*
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <ctype.h>
#include <unistd.h>
#include <fcntl.h>
#include <string.h>
#include <search.h>
#include <errno.h>
#include <gfx_res_util.h> /* our definitions */
#include <gfx_list_util.h>
typedef enum {
} GFXResLabel;
{ video_Hact , "HorizActive" },
{ video_Hfp , "HorizFrontPorch" },
{ video_Hsw , "HorizSyncWidth" },
{ video_Hbp , "HorizBackPorch" },
{ video_Hsrp , "HorizSyncWidthDVS" },
{ video_Vact , "VertActive" },
{ video_Vfp , "VertFrontPorch" },
{ video_Vsw , "VertSyncWidth" },
{ video_Vse , "VertSyncExtension" },
{ video_Vbp , "VertBackPorch" },
{ video_Pclk , "PixelClock" },
{ video_Fint , "Interlace" },
{ video_Fseq , "FieldSeq" },
{ video_Fst , "Stereo" },
{ video_Stype , "SyncType" },
{ video_SonG , "SyncOnG" },
{ video_SHpol , "SyncHorizPolarity" },
{ video_SVpol , "SyncVertPolarity" },
{ video_SGpol , "SyncGreenPolarity" },
{ video_EncodStd , "EncoderStandard" },
{ video_HUndScan , "EncoderHorizUnderscan" },
{ video_VUndScan , "EncoderVertUnderscan" },
{ res_label_last , NULL }
};
/* attribute values used in OWconfig file */
#ifndef TRUE
#define FALSE 0
#endif
/*
* This function loads a video resolution from the file,
* and fills in the generic SunVideoTiming structure.
* It returns an error code if a problem occurs.
*
* This function requires a wrapper to fill in optional
* fields that may not be in the file.
* A minimal one is provided below: sun_get_ow_video_values_raw().
* Another one fills in the values for 1152x900 as
* a fallback in case the file read totally fails,
* it will always return something valid (for X windows).
*
*/
static int
{
int attr_cnt;
int i;
#ifdef DEBUG1
#endif
return -1;
}
/* get all the attributes for our class and instance */
if (!inst_ptr) {
#ifdef DEBUG1
#endif
return -1;
} else {
}
/* now extract the values we're interested in */
#ifdef DEBUG1
#endif
} else {
#ifdef DEBUG1
#if 0 /* Helpful for intense debugging of file problems */
#endif
#endif
case video_Hact:
break;
case video_Hfp:
break;
case video_Hsw:
break;
case video_Hbp:
break;
case video_Hsrp:
break;
case video_Vact:
break;
case video_Vfp:
break;
case video_Vsw:
break;
case video_Vse:
break;
case video_Vbp:
break;
case video_Pclk:
break;
case video_Fint:
break;
case video_Fseq:
break;
case video_Fst:
break;
case video_Stype:
break;
case video_SonG:
break;
case video_SHpol:
break;
case video_SVpol:
break;
case video_SGpol:
break;
case video_EncodStd:
}
}
break;
case video_HUndScan:
break;
case video_VUndScan:
break;
default:
#ifdef DEBUG1
#endif
break;
}
}
}
/* free up attribute memory */
return 0;
}
/*
* This function loads a video resolution from the file.
* It returns an error code if a problem occurs.
*
* This wrapper fills in optional fields, and
* it flags an error if required fields are missing.
*
*/
int
{
#ifdef DEBUG1
#endif
return -1;
}
/* Default values if field is missing (optional) in the file */
/* Fields set to -1 hear are mandatory */
#ifdef DEBUG1
#endif
return -1;
}
/* Make sure all mandatory fields got read from file */
return 0;
}
/*
* This functions looks up a video resolutions in OWconfig,
* and fills in the generic SunVideoTiming structure.
*
* This is the "nice" version that prints out error
* messages on stderr (non debug ones, that is).
* It also returns one hardcoded resolution (1152x900x66),
* if things fail, just so you can always see that something
* has gone wrong (for corrupt or missing resolution files).
* Each card writer should consider whether this is a
* reasonable default resolution. If not they should
* make thier own version of this wrapper, and call the
* raw version of this function. This may also be
* required if printing messages on stderr is a problem
* while not doing debugging (even for fatal errors).
*
*/
int
{
/* fallback values */
#ifdef DEBUG1
#endif
return 0; /* not an error for this wrapper */
}
#ifdef DEBUG1 /* Don't print this twice in debug mode */
#endif
return 0; /* not an error for this wrapper */
}
return 0;
}
char **
{
char **name_list;
#ifdef DEBUG1
#endif
}
return name_list;
}
#ifdef MAIN_TEST
#include <ow_file_util.h>
{
char **video_names ;
char *video_name ;
int i;
if (video_names != NULL) {
for (i=0 ; ; i++) {
video_name = video_names[i];
if (video_name == NULL) {
break;
} else {
}
}
}
}
#endif /* MAIN_TEST */