BB2 C port
API reference: Blitz libraries in C and the shared code
Loading...
Searching...
No Matches
freqlib.c File Reference
#include "blitzlib.h"
#include "blitzexec.h"
#include "filereq_core.h"

Functions

void dofreq (void)
void freqlib_freqchk (void)
static void codefinit (void)
 finit: the end of the program - undo the requester's CD.
static ULONG strlength (const UBYTE *s)
static ULONG dofreq_c (ULONG title, ULONG path, ULONG file, ULONG *scr)
 FileRequest$(Title$,Pathname$,Filename$): the file requester.
 BLITZ_ALIAS (dofreq, dofreq_c)
static void freqchk_c (ULONG path, ULONG file)

Function Documentation

◆ BLITZ_ALIAS()

BLITZ_ALIAS ( dofreq ,
dofreq_c  )

◆ codefinit()

void codefinit ( void )
static

finit: the end of the program - undo the requester's CD.

Fixed (#157): if the gadget "CD" changed the current directory, the directory before the first CD is current again and the requester's lock is unlocked (fq_finit, shared/filereq/filereq_core.c). The original library has no finit.

◆ dofreq()

void dofreq ( void )

◆ dofreq_c()

ULONG dofreq_c ( ULONG title,
ULONG path,
ULONG file,
ULONG * scr )
static

FileRequest$(Title$,Pathname$,Filename$): the file requester.

Opens the requester (shared/filereq/filereq_core.c) on the used screen. OK (button, double click on a file, Return in the file gadget) copies the path and the file name into path$ and file$ and returns path + "/" (unless it ends in ":" or "/") + file; CANCEL and the close gadget return "". The result is copied to a3, the place of the title. Fixed (#153): path$/file$ get the lengths of their new contents (the original left the old lengths). Fixed (#161): a3 ends on the terminating 0 (the original left it behind the 0). Fixed (#1042): what does not fit the requester or the MaxLen of path$/file$ is refused (notice in the screen title bar). The fixed bugs of the requester: see the head comment. DIFF: if chip memory, a library or the window cannot be opened, the result is "" (the original returns an uninitialized long). Errors (debugger, freqchk): path$ or file$ buffer 0 (error 1), "Not enough space in PATH string" (less than 160 bytes), "Not enough space in NAME string" (less than 64 bytes).

Parameters
titled0: Title$ (a3 points at it, the result goes there)
pathd1: the buffer of the variable Pathname$ (160 bytes)
filed2: the buffer of the variable Filename$ (64 bytes)
scra1: the used screen (!libs screenslib,$1102)
Returns
d0: the length of the result; d1/a1 kept

◆ freqchk_c()

void freqchk_c ( ULONG path,
ULONG file )
static

◆ freqlib_freqchk()

void freqlib_freqchk ( void )

◆ strlength()

ULONG strlength ( const UBYTE * s)
static