www.pudn.com > src.rar   To Read all the content


[file head]:
#include <tina/all_tina.h>
#include "bmp.h"


#define MAXPATHLEN 64
static char directory_name[MAXPATHLEN];
static char file_name[MAXPATHLEN];
static char pathname[MAXPATHLEN];
static void *pdir=0, *pfile=0;

static int SCRAM_n = 1;

static Tv *tv = NULL;
static Tv *tv1=NULL;

#define MAXBIT 30
#define MAXDIM 6
static int iminarg1,iminarg2;
#define IMIN(a,b) (iminarg1 = (a),iminarg2 = (b),(iminarg1) < (iminarg2) ? (iminarg1) : (iminarg2))
/*-------------------------sobseq adding funtions-----------------------------------*/
void sobseq(int *n,float x[])
{
int j,k,l;
unsigned long i,im,ipp;
static float fac;
static unsigned long in,ix[MAXDIM + 1],*iu[MAXBIT +1];
static unsigned long mdeg[MAXDIM +1] = {0,1,2,3,3,4,4};
static unsigned long ip[MAXDIM + 1] = {0,0,1,1,2,1,4};
static unsigned long iv[MAXDIM * MAXBIT + 1] = {0,1,1,1,1,1,1,3,1,3,3,1,1,5,7,7,3,3,5,15,11,5,15,13,9};
if (*n < 0)
{
for (k = 1;k <= MAXDIM;k ++)
ix[k] = 0;
in = 0;
if (iv[1] != 1)

... ...

[file tail]:
... ...
id tv_choice_proc();
if (tool)
{
tw_show_tool(tool);
return;
}
tool = (void *)tw_tool("Sobseq Scrambling tool", x, y);
/* Initialise pathname from environment variable (or #define) */
(void) environ_pathname_get(directory_name, file_name,
"TINA_IMAGE_DEFAULT",
"/home/wzz/newimscramdegree/result/Sobseq/Lena.gif");

tv = tv_create("Sobseq original");
tv1 = tv_create("Sobseq scrambled");
tw_choice("Tv choice", tv_choice_proc, 0, "original","scrambled", NULL);
tw_newrow();
tw_newrow();

/*---------------------------*/
pdir = (void *) tw_sglobal("Directory:", directory_name, 32);
tw_button("scan", scan_proc, NULL);
tw_newrow();
pfile = (void*) tw_sglobal("File:", file_name, 32);
tw_newrow();
/*---------------------------*/
tw_iglobal("Scrambling times = ", &amt;SCRAM_n, 5);
tw_newrow();
tw_button("Sobseq", Sobseq_Trans,NULL);
tw_button("R_Sobseq", R_Sobseq_Trans,NULL);
tw_newrow();
tw_newrow();
tw_end_tool();
}