// Open a buffered file APTR LIBFUNC L_OpenBuf( REG(a0, char *name), REG(d0, long mode), REG(d1, long buffer_size)) { BufFile *file; // Allocate file handle if (!(file=AllocVec(sizeof(BufFile),MEMF_CLEAR))) return 0; // Open file if (!(file->file=Open(name,mode))) { FreeVec(file); return 0; } // Store DOS pointer file->dos=DOSBase; // Allocate buffer if (buffer_size>0) { if ((file->buffer=AllocVec(buffer_size,0))) file->buffer_size=buffer_size; } return file; }
void schedule(int t, void (*callback)(void *p), void *p) { struct nscallback *nscb; struct TimeVal tv; ULONG time_us = 0; if(schedule_list == NULL) return; nscb = AllocVec(sizeof(struct nscallback), MEMF_PRIVATE | MEMF_CLEAR); if(!nscb) return; time_us = t*10000; /* t converted to µs */ nscb->tv.Seconds = time_us / 1000000; nscb->tv.Microseconds = time_us % 1000000; GetSysTime(&tv); AddTime(&nscb->tv,&tv); // now contains time when event occurs if(nscb->treq = AllocVec(sizeof(struct TimeRequest),MEMF_PRIVATE | MEMF_CLEAR)) { *nscb->treq = *tioreq; nscb->treq->Request.io_Command=TR_ADDREQUEST; nscb->treq->Time.Seconds=nscb->tv.Seconds; // secs nscb->treq->Time.Microseconds=nscb->tv.Microseconds; // micro SendIO((struct IORequest *)nscb->treq); } nscb->callback = callback; nscb->p = p; pblHeapInsert(schedule_list, nscb); }
static bool URLHistoryFound(const char *url, const struct url_data *data) { struct Node *node; /* skip this URL if it is already in the list */ if(URLHistory_FindPage(url)) return true; node = AllocVec( sizeof( struct Node ), MEMF_SHARED|MEMF_CLEAR ); if ( node ) { STRPTR urladd = (STRPTR) AllocVec( strlen ( url ) + 1, MEMF_SHARED|MEMF_CLEAR ); if ( urladd ) { strcpy(urladd, url); node->ln_Name = urladd; AddTail( &PageList, node ); } else { FreeVec(node); } } return true; }
HOOKPROTONHNO(TreeView_ConstructHookFunction, APTR, struct MUIP_NListtree_ConstructMessage *ncm) { DebOut("ncm: %lx\n", ncm); struct TreeLine *line=(struct TreeLine *) AllocVec(sizeof(struct TreeLine), 0); TVINSERTSTRUCT *is=(TVINSERTSTRUCT *) ncm->UserData; DebOut("is: %lx\n", is); DebOut("ncm->name: %s\n", ncm->Name); if(line && is) { line->config=(struct ConfigStruct *) AllocVec(sizeof(struct ConfigStruct), 0); if(is->itemex.pszText) { DebOut("is->itemex.pszText: %s\n", is->itemex.pszText); strncpy(line->name, is->itemex.pszText, MAX_DPATH-1); } if(is->itemex.lParam) { memcpy((void *) line->config, (const void *) is->itemex.lParam, sizeof(struct ConfigStruct)); } } else { DebOut("NOT ENOUGH MEMORY!\n"); } DebOut("return: %lx\n", line); return line; }
/* Parse a line for a template. Result should be freed via FreeTemplate() */ APTR ParseTemplate(CONST_STRPTR temp, STRPTR line, APTR results) { ULONG *mem = (ULONG*)AllocVec(12,0); if(mem) { struct RDArgs *rdargs = (struct RDArgs*)AllocDosObject(DOS_RDARGS,NULL); if((mem[0] = (ULONG)rdargs)) { LONG len = mystrlen(line)+2; STRPTR buf = (STRPTR)AllocVec(len,0); if((mem[1] = (ULONG)buf)) { struct RDArgs *rd; if (line) strcpy(buf,line); buf[len-2]=10; buf[len-1]=0; rdargs->RDA_Buffer = NULL; rdargs->RDA_Source.CS_Buffer = (UBYTE *)buf; rdargs->RDA_Source.CS_Length = strlen(buf); rdargs->RDA_Source.CS_CurChr = 0; rd = ReadArgs(temp,(LONG*)results, rdargs ); if((mem[2] = (ULONG)rd)) { return mem; } } } } FreeTemplate(mem); return NULL; }
FT_New_Memory( void ) { FT_Memory memory; #ifdef __amigaos4__ memory = (FT_Memory)AllocVec( sizeof ( *memory ), MEMF_SHARED ); #else memory = (FT_Memory)AllocVec( sizeof ( *memory ), MEMF_PUBLIC ); #endif if ( memory ) { #ifdef __amigaos4__ memory->user = CreatePool( MEMF_SHARED, 16384, 16384 ); #else memory->user = CreatePool( MEMF_PUBLIC, 16384, 16384 ); #endif if ( memory->user == NULL ) { FreeVec( memory ); memory = NULL; } else { memory->alloc = ft_alloc; memory->realloc = ft_realloc; memory->free = ft_free; #ifdef FT_DEBUG_MEMORY ft_mem_debug_init( memory ); #endif } } return memory; }
void mount(struct HDTBPartition *table, struct PartitionHandle *ph, STRPTR name, struct DosEnvec *de) { struct ExpansionBase *ExpansionBase; struct DeviceNode *dn; struct DosEnvec *nde; IPTR *params; ULONG i; D(bug("[HDToolBox] mount('%s')\n", name)); #error "TODO: pass DOS device name in params[0] and set handler name manually" #warning "TODO: get filesystem" if ((de->de_DosType & 0xFFFFFF00) == BBNAME_DOS) { ExpansionBase = (struct ExpansionBase *)OpenLibrary("expansion.library",41); if (ExpansionBase) { params = (IPTR *)AllocVec(sizeof(struct DosEnvec)+sizeof(IPTR)*4, MEMF_PUBLIC | MEMF_CLEAR); if (params) { nde = (struct DosEnvec *)¶ms[4]; CopyMem(de, nde, sizeof(struct DosEnvec)); params[0] = (IPTR)"afs.handler"; params[1] = (IPTR)table->hd->devname; params[2] = (IPTR)table->hd->unit; params[3] = 0; i = getOffset(ph->root); nde->de_LowCyl += i; nde->de_HighCyl += i; dn = MakeDosNode(params); if (dn) { dn->dn_Name = MKBADDR(AllocVec(AROS_BSTR_MEMSIZE4LEN(strlen(name)), MEMF_PUBLIC)); dn->dn_Ext.dn_AROS.dn_DevName = AROS_BSTR_ADDR(dn->dn_Name); i = 0; do { AROS_BSTR_putchar(dn->dn_Name, i, name[i]); } while (name[i++]); AROS_BSTR_setstrlen(dn->dn_Name, i-1); AddDosNode(nde->de_BootPri, ADNF_STARTPROC, dn); } else FreeVec(params); } CloseLibrary((struct Library *)ExpansionBase); } } else kprintf("ignored %s: unknown FS (0x%lx)\n", name, de->de_DosType); }
static struct sw_displaytarget * HiddVC4CreateDisplaytarget(struct sw_winsys *winsys, unsigned tex_usage, enum pipe_format format, unsigned width, unsigned height, unsigned alignment, unsigned *stride) { struct HiddVC4Displaytarget * spdt = AllocVec(sizeof(struct HiddVC4Displaytarget), MEMF_PUBLIC | MEMF_CLEAR); *stride = align(util_format_get_stride(format, width), alignment); spdt->data = AllocVec(*stride * height, MEMF_PUBLIC | MEMF_CLEAR); return (struct sw_displaytarget *)spdt; }
struct List *GetModes(struct AHIUnitPrefs *prefs) { struct List *list; list = AllocVec(sizeof(struct List), MEMF_CLEAR); if(list) { ULONG id = AHI_NextAudioID(AHI_INVALID_ID); NewList(list); while(id != AHI_INVALID_ID) { struct ModeNode *t; struct Node *node; t = AllocVec( sizeof(struct ModeNode), MEMF_CLEAR); if( t != NULL ) { LONG realtime; t->node.ln_Name = t->name; t->ID = id; realtime = FALSE; AHI_GetAudioAttrs(id, NULL, AHIDB_BufferLen, 80, AHIDB_Name, (ULONG) t->node.ln_Name, AHIDB_Realtime, (ULONG) &realtime, TAG_DONE); if((prefs->ahiup_Unit == AHI_NO_UNIT) || realtime ) { // Insert node alphabetically for(node = list->lh_Head; node->ln_Succ; node = node->ln_Succ) { if(Stricmp(t->node.ln_Name,node->ln_Name) < 0) break; } Insert(list, (struct Node *) t, node->ln_Pred); } else { FreeVec(t); } } id = AHI_NextAudioID(id); } } return list; }
void *lib_AllocVec(unsigned long size, unsigned long attributes) { #ifdef LIB_DEBUG void *ptr; if (attributes & MEMF_CLEAR) { ptr = lib_debug_libc_calloc(1, size); } else { ptr = lib_debug_libc_malloc(size); } #else void *ptr = AllocVec(size, attributes); #endif #ifndef __OS2__ if (ptr == NULL && size > 0) { fprintf(stderr, "error: lib_AllocVec failed\n"); exit(-1); } #endif #ifdef LIB_DEBUG lib_debug_alloc(ptr, size, 1); #endif return ptr; }
void SendEvent(LONG event) { struct IOStdReq *InputRequest; struct MsgPort *InputPort; struct InputEvent *ie; if ((InputPort = (struct MsgPort*)CreateMsgPort())) { if ((InputRequest = (struct IOStdReq*)CreateIORequest(InputPort, sizeof(struct IOStdReq)))) { if (!OpenDevice("input.device", 0, (struct IORequest*)InputRequest, 0)) { if ((ie = AllocVec(sizeof(struct InputEvent), MEMF_PUBLIC | MEMF_CLEAR))) { ie->ie_Class = event; InputRequest->io_Command = IND_WRITEEVENT; InputRequest->io_Data = ie; InputRequest->io_Length = sizeof(struct InputEvent); DoIO((struct IORequest*)InputRequest); FreeVec(ie); } CloseDevice((struct IORequest*)InputRequest); } DeleteIORequest((struct IORequest *)InputRequest); } DeleteMsgPort (InputPort); } }
int get_fs_usage (const char *path, const char *disk, struct fs_usage *fsp) { struct InfoData *info = (struct InfoData *)AllocVec(sizeof *info, MEMF_ANY); int result = -1; if (info) { BPTR lock = Lock (path, SHARED_LOCK); if (lock) { if (Info (lock, info)) { fsp->fsu_blocks = adjust_blocks (info->id_NumBlocks, info->id_BytesPerBlock, 512); fsp->fsu_bfree = fsp->fsu_bavail = adjust_blocks (info->id_NumBlocks - info->id_NumBlocksUsed, info->id_BytesPerBlock, 512); fsp->fsu_files = fsp->fsu_ffree = -1; result = 0; } UnLock (lock); } FreeVec (info); } return result; }
struct SysSocket *Sys_Net_CreateSocket(struct SysNetData *netdata, enum netaddrtype addrtype) { struct SysSocket *s; int r; int one; one = 1; if (addrtype != NA_IPV4) return 0; s = AllocVec(sizeof(*s), MEMF_ANY); if (s) { s->s = socket(AF_INET, SOCK_DGRAM, 0); if (s->s != -1) { r = IoctlSocket(s->s, FIONBIO, (void *)&one); if (r == 0) { return s; } CloseSocket(s->s); } FreeVec(s); } return 0; }
/**************************** Function: CreateContext Vector: 19 Offset: -114 Arguments: A0.L pointer to pointer to struct Gadget Returns: D0.L pointer to stuct Gadget ****************************/ int lib_gadtools_f_CreateContext(emumsg_syscall_t *msg) { cpu_t *cpu; struct Gadget **ptr; DEBUG(4) dprintf("gadtools.library: lib_gadtools_f_CreateContext() called\n"); cpu = msg->proc->cpu; DEBUG(5) dprintf(" Gadget ptr ptr (A0): 0x%x\n",cpu->a[0]); /* Allocate temporary space for the pointer */ ptr = (struct Gadget **)AllocVec(sizeof(struct Gadget *),MEMF_PUBLIC|MEMF_CLEAR); if(ptr == NULL) { DEBUG(1) dprintf("Error: gadtools.library: lib_gadtools_f_CreateContext: Could not allocate temporary memory\n"); return HOOK_END_PROC; } /* Prepare syscall */ msg->arg[0]._aptr = (APTR)ptr; /* Remember memory */ msg->internalPtr = ptr; /* Do syscall */ return HOOK_SYSCALL; }
// Decompile function string into list of functions void funced_decompile(FuncEdData *data) { FunctionEntry *entry; Cfg_Instruction *ins; // Clear list Att_RemList(data->function_list,REMLIST_SAVELIST|REMLIST_FREEDATA); // Copy to function entry list for (ins=(Cfg_Instruction *)data->function->instructions.mlh_Head; ins->node.mln_Succ; ins=(Cfg_Instruction *)ins->node.mln_Succ) { // Label? if (ins->type==INST_LABEL) { // Store label stccpy(data->label,ins->string,79); continue; } // Allocate function entry if ((entry=AllocVec(sizeof(FunctionEntry),MEMF_CLEAR))) { // Store function data entry->type=ins->type; if (ins->string) strcpy(entry->buffer,ins->string); // Add entry to list if (!(entry->node=Att_NewNode(data->function_list,0,(ULONG)entry,0))) FreeVec(entry); } } }
user_mapping *user_mapping::create(uint32_t length) { DEBUG(5) dprintf("user_mapping::create() called. length=%d\n", length); uint8_t *mem = (uint8_t *)AllocVec(length, MEMF_PUBLIC|MEMF_CLEAR); if(!mem) return NULL; user_mapping *mapping = new user_mapping(length, mem); if(!mapping) { FreeVec(mem); return NULL; } emulator *emu = emulator::getEmulator(); uint32_t new_address = emu->v_space.add_mapping(mapping); // TODO: Add to r_space too? if(new_address == 0xFFFFFFFF) { delete mapping; return NULL; } return mapping; }
/* Wanderer doesnt free this mem at the moment but should incase it is every closed */ static STRPTR ExpandEnvName(STRPTR env_path) { BOOL ok = FALSE; char tmp_envbuff[1024]; STRPTR fullpath = NULL; BPTR env_lock = (BPTR) NULL; env_lock = Lock("ENV:", SHARED_LOCK); if (env_lock) { if (NameFromLock(env_lock, tmp_envbuff, 256)) ok = TRUE; UnLock(env_lock); } if (ok) { if ((fullpath = AllocVec(strlen(tmp_envbuff) + strlen(env_path) + 1 + 1 - 4, MEMF_CLEAR | MEMF_PUBLIC)) != NULL) { strcpy(fullpath, tmp_envbuff); AddPart(fullpath, env_path + 4, 1019); return fullpath; } } //We couldnt expand it so just use as is .. return env_path; }
// Get a toolbar ToolBarInfo *OpenToolBar(Cfg_ButtonBank *buttons,char *pathname) { ToolBarInfo *toolbar; // Allocate toolbar structure if (toolbar=AllocVec(sizeof(ToolBarInfo),MEMF_CLEAR)) { // Bank provided? if (buttons) toolbar->buttons=buttons; // Load disk file else if (pathname && pathname[0]) toolbar->buttons=OpenButtonBank(pathname); // Invalid? if (!toolbar->buttons || !(GetToolBarCache(toolbar,FALSE))) { FreeToolBar(toolbar); return 0; } } // Bank provided? Copy pathname if (buttons && pathname) strcpy(pathname,buttons->path); return toolbar; }
SRes SzFileReadImp(void *object, void *buffer, size_t *size) { CFileXadInStream *s = (CFileXadInStream *)object; #ifdef __amigaos4__ struct xadMasterIFace *IxadMaster = s->IxadMaster; #else struct xadMasterBase *xadMasterBase = s->xadMasterBase; #endif if(!g_buffer) g_buffer = AllocVec(kBufferSize, MEMF_PRIVATE); size_t processedSizeLoc =+ *size; // =+ //s->posn = processedSizeLoc; if (*size > kBufferSize) *size = kBufferSize; if(xadHookAccess(XADAC_READ, *size, g_buffer, s->ai) != XADERR_OK) return SZ_ERROR_FAIL; memcpy(buffer, g_buffer, *size); // *buffer = g_buffer; /* if (processedSize != 0) *processedSize = processedSizeLoc; */ return SZ_OK; }
static BOOL AddUnit(struct List *list, int unit) { struct UnitNode *u; u = AllocVec(sizeof(struct UnitNode), MEMF_CLEAR); if(u == NULL) { return FALSE; } u->prefs.ahiup_Unit = unit; u->prefs.ahiup_Channels = 1; u->prefs.ahiup_AudioMode = AHI_BestAudioID(AHIDB_Realtime, TRUE, TAG_DONE); u->prefs.ahiup_Frequency = 8000; u->prefs.ahiup_MonitorVolume = 0x00000; u->prefs.ahiup_InputGain = 0x10000; u->prefs.ahiup_OutputVolume = 0x10000; u->prefs.ahiup_Input = 0; u->prefs.ahiup_Output = 0; FillUnitName(u); u->node.ln_Pri = -unit; Enqueue(list, (struct Node *) u); return TRUE; }
struct MidiCluster *NewCluster(char *name,struct CamdBase *CamdBase){ struct MyMidiCluster *mymidicluster; struct MidiCluster *midicluster; mymidicluster=AllocMem(sizeof(struct MyMidiCluster),MEMF_ANY | MEMF_CLEAR | MEMF_PUBLIC); if(mymidicluster==NULL) return NULL; InitSemaphore(&mymidicluster->semaphore); midicluster=&mymidicluster->cluster; midicluster->mcl_Node.ln_Name=AllocVec(mystrlen(name) + 1,MEMF_ANY|MEMF_PUBLIC); if(midicluster->mcl_Node.ln_Name==NULL){ FreeMem(midicluster,sizeof(struct MyMidiCluster)); return NULL; } mysprintf(CamdBase,midicluster->mcl_Node.ln_Name,"%s",name); NEWLIST(&midicluster->mcl_Receivers); NEWLIST(&midicluster->mcl_Senders); AddTail(&CB(CamdBase)->midiclusters,&midicluster->mcl_Node); return midicluster; }
/* Returns the lock of a name (Allocated with AllocVec()) */ STRPTR NameOfLock( BPTR lock ) { STRPTR n; BOOL again; ULONG bufSize = 127; if( !lock ) return NULL; do { again = FALSE; if((n = (STRPTR)AllocVec(bufSize, 0x10000 ))) { if( NameFromLock( lock, n, bufSize-1 ) == DOSFALSE ) { if( IoErr() == ERROR_LINE_TOO_LONG ) { bufSize += 127; again = TRUE; } FreeVec(n); n = NULL; } } } while(again); return n; }
static void* CreateConnectionData(DBusConnection* connection) { struct ConnectionData* c = AllocVec(sizeof(struct ConnectionData), MEMF_ANY|MEMF_CLEAR); kprintf("CreateConnectionData %08lx\n", c); if (c != NULL) { c->connection = connection; c->creator = FindTask(NULL); NewList((struct List*) &c->watches); Forbid(); kprintf("creating mainloop\n"); c->main = (struct Task*) CreateNewProcTags(NP_Entry, (ULONG) MainLoop, NP_Name, (ULONG) "dbus.library main loop", NP_Priority, 0, TAG_DONE); kprintf("created mainloop %08lx\n", c->main); if (c->main != NULL) { c->main->tc_UserData = c; } SetSignal(0, SIGF_SINGLE); Permit(); Wait(SIGF_SINGLE); if (c->main == NULL) { DeleteConnectionData(c); c = NULL; } } return c; }
int GuiList::initButtons() { dialogBox.field_10 = shownEntries + 8; ButtonBox* v4 = (ButtonBox *)AllocVec(sizeof(ButtonBox) * 33, 65537); if (!v4) return 0; for (int i = 0; i < 32; i++) dialogBox.buttons[i] = &v4[i]; if ( listFlags & GLIST_FLAG_WITH_ICON ) { iconBox.field_10 = 1; iconBox.buttons[0] = &v4[32]; iconBox.buttons[0]->x = 0; iconBox.buttons[0]->y = 0; iconBox.buttons[0]->w = 16; iconBox.buttons[0]->h = 16; } else { iconBox.field_10 = 0; } return 1; }
APTR AHIAllocVec( ULONG byteSize, ULONG requirements ) { #ifndef VERSION68K if( PPCLibBase != NULL ) { return PPCAllocVec( byteSize, requirements ); } else if( PowerPCBase != NULL ) { ULONG new_requirements; new_requirements = requirements & ~MEMF_PPCMASK; if( requirements & MEMF_WRITETHROUGHPPC ) new_requirements |= MEMF_WRITETHROUGH; if( requirements & MEMF_NOCACHEPPC ) new_requirements |= MEMF_CACHEOFF; if( requirements & MEMF_NOCACHESYNCPPC ) new_requirements |= ( MEMF_CACHEOFF | MEMF_GUARDED ); if( requirements & MEMF_NOCACHESYNCM68K ) new_requirements |= MEMF_CHIP; // Sucks! return AllocVec32( byteSize, new_requirements ); } else #endif { return AllocVec( byteSize, requirements & ~MEMF_PPCMASK ); } }
int GuiList::initDialogStrings(_NC_STACK_ypaworld *yw) { char *draw_cmd = (char *)AllocVec(512, 1); if ( !draw_cmd ) return 0; int xpos = dialogBox.xpos - (yw->screen_width / 2); int ypos = dialogBox.ypos - (yw->screen_height / 2); cmdstrm.cmdbuf = draw_cmd; char *v7 = draw_cmd; if ( listFlags & GLIST_FLAG_WITH_TITLEBAR ) { v7 = GuiBase::FormateTitle(yw, xpos, ypos, dialogBox.btn_width, title, draw_cmd, 0, flags); FontUA::next_line(&v7); } else { FontUA::select_tileset(&v7, 0); FontUA::set_center_xpos(&v7, xpos); FontUA::set_center_ypos(&v7, ypos); } FontUA::include(&v7, 1); // Include data part FontUA::include(&v7, 0); // Include slider FontUA::set_end(&v7); return 1; }
static int32 level_init(struct SLAB_Level *sl, uint8 shift, uint32 capacity) { int32 res = 0; uint32 bytes; sl->shift = shift; sl->capacity = capacity; _atomic_cnt_init(&sl->used); bytes = (SHIFT2BYTES(shift) + sizeof(struct SMem_Header)) * capacity; #ifndef __amigaos4__ sl->mem_block = AllocVec(bytes, MEMF_PUBLIC); #else sl->mem_block = IExec->AllocVec(bytes, MEMF_PUBLIC); #endif _atomic_stack_init(&sl->stk); if(sl->mem_block) { memblock_init(sl, (uint8*)sl->mem_block); res = 1; } return(res); }
struct MsgPort *lib_CreateMsgPort(SysBase *SysBase) { struct MsgPort *ret=NULL; ret = (struct MsgPort *)AllocVec(sizeof(struct MsgPort), MEMF_FAST|MEMF_CLEAR); //MEMF_PUBLIC|MEMF_CLEAR); if (NULL != ret) { INT8 sb; sb = AllocSignal(-1); if (sb != -1) { ret->mp_SigBit = sb; ret->mp_Flags = PA_SIGNAL; ret->mp_Node.ln_Type = NT_MSGPORT; ret->mp_SigTask = (struct Task *)FindTask(NULL); //DPrintF("MsgPort Task: %x [%s]\n",ret->mp_SigTask, ret->mp_SigTask->Node.ln_Name); NewListType(&ret->mp_MsgList, NT_MSGPORT); } else { FreeVec(ret); ret = NULL; } } return ret; }
// Show a requester void global_requester(char *text) { RexxRequester *req; char *ok_str; // Get OK string ok_str=GetString(&locale,MSG_OKAY); // Allocate requester argument packet if (req=AllocVec(sizeof(RexxRequester)+strlen(text)+strlen(ok_str)+5,MEMF_CLEAR)) { // Store message req->command=RXCMD_REQUEST; // Copy string strcpy(req->args,"\""); strcat(req->args,text); strcat(req->args,"\" "); strcat(req->args,ok_str); // Startup requester process if (!(misc_startup( "dopus_rexx_request", REXX_REQUESTER, GUI->window, req, 0))) FreeVec(req); } }
IPC_StartupCode(funced_init, FunctionStartup *, startup) #endif { FuncEdData *data; // Allocate data if (!(data=AllocVec(sizeof(FuncEdData),MEMF_CLEAR))) return 0; // Store data startup->data=data; // Initialise some pointers data->startup=startup; data->function=startup->function; data->locale=startup->locale; // Create timer if (!(data->drag.timer=AllocTimer(UNIT_VBLANK,0))) return 0; // Create lists if (!(data->func_display_list=Att_NewList(0)) || !(data->flag_list=Att_NewList(0)) || !(data->function_list=Att_NewList(0))) return 0; // Create app port data->appport=CreateMsgPort(); return 1; }