Skip DEFER'd assigns
Posted: Thu May 11, 2017 11:40 pm
In my project, Workbench Explorer, it scans for all the assigns. It was brought to my attention that it does not "skip over" DEFER'd assigns; it "activates" them during the scanning process.
I don't see any way around this. Is there some other way to scan for the assigns? I am using what the AutoDocs say to use:
The while() loop checks if it is a multi-assign, then gets populated later. I have commented that section out, same thing.
I don't see any way around this. Is there some other way to scan for the assigns? I am using what the AutoDocs say to use:
Code: Select all
BOOL
GetAssigns(VOID)
{
BOOL Success=TRUE;
struct Node *node;
struct List *ADOList;
struct DevProc *dp=NULL;
if ((ADOList=IDOS->AllocDosObjectTags(DOS_VOLUMELIST,
ADO_Type, LDF_ASSIGNS|LDF_READ,
ADO_AddColon, TRUE,
TAG_END)))
{
for(node=IExec->GetHead(ADOList); node; node=IExec->GetSucc(node))
{
if (!(AssignsNode=(struct AssignsNode *)SAK_CreateGenericListNode(sizeof(struct AssignsNode),(STRPTR)"")))
{
SAK_EasyRequest(Objects[OID_WINDOW],MainWindow,RequesterTitle,REQIMAGE_ERROR,0,SAK_LocaleString(MSG_COULD_NOT_CREATE_EXEC_LIST_NODE),SAK_LocaleString(MSG_CONTINUE));
Success=FALSE;
break;
}
SAK_AddGenericListNode(MasterAssignsList,(struct Node *)AssignsNode,GLIST_BOTTOM);
IUtility->SNPrintf(AssignsNode->Name,128,"%s",node->ln_Name);
IUtility->SNPrintf(AssignsNode->UserData,128,"[Ass]%s",AssignsNode->Name);
AssignsNode->IsMultiAssign=FALSE;
while ((dp=IDOS->GetDeviceProcFlags(node->ln_Name,dp,LDF_ASSIGNS)))
{
if (dp->dvp_Flags & DVPB_ASSIGNMENT)
{
AssignsNode->IsMultiAssign=TRUE;
}
}
}
if (dp)
{
IDOS->FreeDeviceProc(dp);
dp=NULL;
}
IDOS->FreeDosObject(DOS_VOLUMELIST,ADOList);
}
return(Success);
}