home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Computer Club Elmshorn Atari PD
/
CCE_PD.iso
/
pc
/
0400
/
CCE_0493.ZIP
/
CCE_0493.PD
/
SLECTRIC.110
/
SAMPLE.C
< prev
next >
Wrap
C/C++ Source or Header
|
1992-09-03
|
2KB
|
78 lines
/* ------------------------------------------------------------------------- */
/* ----- sample.c ----- Selectric Example ---------------------------------- */
/* ------------------------------------------------------------------------- */
/* ----------------------------------------- (c) 1992 by Oliver Scheel ----- */
/* ------------------------------------------------------------------------- */
#include <stdio.h>
#include <aes.h>
#include "fsel_inp.h"
#define DEMO 1
/* ------------------------------------------------------------------------- */
char p0[128] = "C:\\ACCS\\*.AC?",
p1[128] = "C:\\TOOLS\\*.*",
p2[128] = "",
p3[128] = "";
char e0[17] = "*.AC[CX]",
e1[17] = "*.PRG",
e2[17] = "*.TXT,*.DOC",
e3[17] = "*.INF";
char *my_paths[4] = { p0, p1, p2, p3 };
char *my_ext[4] = { e0, e1, e2, e3 };
char more_fnames[5 * 15]; /* entspricht 5 Namen a 15 Zeichen */
char pfname[128] = "",
pname[128] = "",
fname[14] = "";
/* ------------------------------------------------------------------------- */
int main(void)
{
int is_slct_da, d;
#if (DEMO==1)
DTA mydta;
#endif
appl_init();
slct_extpath(4, &my_ext, 4, &my_paths); /* eigene Pfade setzen */
#if (DEMO==1)
is_slct_da = slct_check(0x0102);
if(is_slct_da)
slct->comm = CMD_FILES_OUT|CFG_FIRSTNEXT;
#else
is_slct_da = slct_morenames(1, 5, more_fnames); /* we want more */
#endif
wind_update(BEG_MCTRL); /* Wichtig!! */
if(file_select(pfname, pname, fname, "*.*", "Selectric\277 Sample"))
{
if(is_slct_da)
{
#if (DEMO==1)
d = slct_first(&mydta, FA_ARCHIVE);
while(!d)
{
printf("\n\r%s\t%02x", mydta.d_fname, mydta.d_attrib);
d = slct_next(&mydta);
}
slct_release();
#else
/* weggucken ... */
printf("\r\nYou wanted more ... \r\n\n%s", more_fnames);
#endif
}
}
wind_update(END_MCTRL); /* Wichtig!! */
appl_exit();
return(0);
}