home *** CD-ROM | disk | FTP | other *** search
- //#define DEBUG
- #include <debug.h>
- #include <extras/macros/intuition.h>
-
- #include "MPP.h"
- #include "mppexterns.h"
- #include <ctype.h>
- #include <utility/hooks.h>
-
- BOOL ImportFile(STRPTR FileName)
- {
- ULONG l;
- struct List ilist[NUM_LISTS];
- struct Node *n;
-
- for(l=0;l<NUM_LISTS;l++)
- NewList(&ilist[l]);
-
- LoadFile(ilist, FileName);
-
- ObtainSemaphore(&MPSem->NodeSem);
- for(l=0;l<NUM_LISTS;l++)
- {
- while(n=RemHead(&ilist[l]))
- {
- if(!FindName(&MPSem->PromotionList[l],n->ln_Name))
- {
- /* don't add dupes */
- AddTail(&MPSem->PromotionList[l],n);
- }
- else
- {
- FreeDNode(n);
- }
- }
- }
- FixScreenModeNames();
- ReleaseSemaphore(&MPSem->NodeSem);
-
- return(1);
- }
-