home *** CD-ROM | disk | FTP | other *** search
- TABLE OF CONTENTS
-
- dospath.library/BuildPathListTagList
- dospath.library/CopyPathList
- dospath.library/CopyWorkbenchPathList
- dospath.library/FindFileInPathList
- dospath.library/FreePathList
- dospath.library/GetProcessPathList
- dospath.library/RemoveFromPathList
- dospath.library/SetProcessPathList
-
- dospath.library/BuildPathListTagList dospath.library/BuildPathListTagList
- dospath.library/BuildPathListTags dospath.library/BuildPathListTags
-
- NAME
- BuildPathListTagList -- Build a path list from directory names
-
- SYNOPSIS
- head = BuildPathListTagList(anchor, tags)
- D0 A0 A1
-
- struct PathListEntry *BuildPathListTagList(struct PathListEntry **,
- struct TagItem *)
-
- head = BuildPathListTags(anchor, ...)
-
- struct PathListEntry *BuildPathListTags(struct PathListEntry **, ...)
-
- FUNCTION
- This function builds an AmigaDOS CLI command path list from directory
- names. The new path list can be chained to an already existing path
- list if a pointer to the last entry of this list is supplied.
-
- The path list can be deallocated with FreePathList().
-
- You have to convert this pointer to a BPTR with the BADDR() macro
- if you supply this path list to AmigaDOS.
-
- The following tags are currently supported:
-
- DOSPath_BuildFromArray (const char **)
-
- Pointer to a NULL terminated array of directory names.
-
- DOSPath_BuildFromList (struct List *)
-
- Pointer to an Exec list containing the directory names.
-
- INPUTS
- anchor - Pointer to a pointer to the last entry of the list to which
- the new path list entries should be added. If you want to
- chain several lists together then you have to initialize
- anchor to NULL for the first list. You may supply NULL if
- you don't want to chain path lists.
-
- tags - List of TagItems
-
- RESULTS
- head - Pointer to first entry in the new list or NULL if the list
- could not be created.
-
- anchor - Pointer to last entry in the new list. If the list could not
- be created then the contents of the variable to which anchor
- points are NOT changed!
-
- SEE ALSO
- CopyPathList(), FreePathList()
-
- dospath.library/CopyPathList dospath.library/CopyPathList
-
- NAME
- CopyPathList -- Copy a path list
-
- SYNOPSIS
- head = CopyPathList(orig, anchor)
- D0 A0 A1
-
- struct PathListEntry *CopyPathList(struct PathListEntry *,
- struct PathListEntry **)
-
- FUNCTION
- This function copies an AmigaDOS CLI command path list. The new path
- list can be chained to an already existing path list if a pointer to
- the last entry of this list is supplied.
-
- The path list can be deallocated with FreePathList().
-
- You have to convert this pointer to a BPTR with the BADDR() macro
- if you supply this path list to AmigaDOS.
-
- INPUTS
- orig - Pointer to head of the original path list.
- Passing a NULL argument is harmless.
-
- anchor - Pointer to a pointer to the last entry of the list to which
- the new path list entries should be added. If you want to
- chain several lists together then you have to initialize
- anchor to NULL for the first list. You may supply NULL if
- you don't want to chain path lists.
-
- RESULTS
- head - Pointer to first entry in the new list or NULL if the list
- could not be copied.
-
- anchor - Pointer to last entry in the new list. If the list could not
- be created then the contents of the variable to which anchor
- points are NOT changed!
-
- SEE ALSO
- BuildPathListTagList(), FreePathList()
-
- dospath.library/CopyWorkbenchPathList dospath.library/CopyWorkbenchPathList
-
- NAME
- CopyWorkbenchPathList -- Copy path from Workbench process
-
- SYNOPSIS
- head = CopyWorkbenchPathList(startup, anchor)
- D0 A0 A1
-
- struct PathListEntry *CopyWorkbenchPathList(struct WBStartup *,
- struct PathListEntry **)
-
- FUNCTION
- This function tries to find the Workbench process and copies the
- AmigaDOS command path list from this process. This is interesting for
- processes which want to install the system default path for starting
- new processes.
-
- Process started from the Workbench must supply their WBStartup message.
- With this structure the function can safely discover the Workbench
- process. If you supply NULL for the WBStartup message then it tries to
- find a task called "Workbench" in the system.
-
- The path list can be deallocated with FreePathList().
-
- You have to convert this pointer to a BPTR with the BADDR() macro
- if you supply this path list to AmigaDOS.
-
- INPUTS
- startup - Pointer to the WBStartup message for process started from
- the Workbench. Other processes must supply NULL.
-
- anchor - Pointer to a pointer to the last entry of the list to which
- the new path list entries should be added. If you want to
- chain several lists together then you have to initialize
- anchor to NULL for the first list. You may supply NULL if
- you don't want to chain path lists.
-
- RESULTS
- head - Pointer to first entry in the new list or NULL if the list
- could not be copied. NULL is also returned if the Workbench
- process could not be found or a process with this name was not
- a CLI process.
-
- anchor - Pointer to last entry in the new list. If the list could not
- be created then the contents of the variable to which anchor
- points are NOT changed!
-
- WARNING
- If NULL is supplied for the WBStartup message then this function uses
- FindTask() to find the Workbench process. There is no guarantee that
- this is the process of the real Workbench. It also can't use Forbid()
- to protect the FindTask() call and during the list copy. It will get
- into big trouble if the Workbench process quits while it tries to copy
- the path. You have been warned!
-
- SEE ALSO
- BuildPathListTagList(), CopyPathList(), FreePathList()
-
- dospath.library/FindFileInPathList dospath.library/FindFileInPathList
-
- NAME
- FindFileInPathList - Find a file in a path list
-
- SYNOPSIS
- lock = FindFileInPathList(state, file)
- D0 A0 A1
-
- BPTR FindFileInPathList(struct PathListEntry **, const char *)
-
- FUNCTION
- This function scans through the path list and tries to find the file in
- each directory. It returns a lock to the directory where the file was
- found.
-
- This function can be called several times in order to iterate through
- the complete path list. So you are able to find all occurences of the
- file.
-
- INPUTS
- state - Pointer to a pointer to a path list. The function stores the
- current position in the list after each invocation. It should
- be initialized to point to the head of the list before the
- first invocation.
- Passing a NULL argument is harmless.
-
- file - File name.
- Passing a NULL argument is harmless.
-
- RESULTS
- lock - Lock of the directory where the file is located or NULL.
- Use DupLock() if you want to get a copy of this lock.
-
- dospath.library/FreePathList dospath.library/FreePathList
-
- NAME
- FreePathList -- Free a path list
-
- SYNOPSIS
- FreePathList(head)
- A0
-
- void FreePathList(struct PathListEntry *)
-
- FUNCTION
- Free an AmigaDOS CLI command path list created by
- BuildPathListTagList(), CopyPathList() or CopyWorkbenchPathList().
-
- INPUTS
- head - Pointer to head of the path list to be freed.
- Passing a NULL argument is harmless.
-
- NOTE
- This function should NOT be used to free path lists allocated by
- AmigaDOS itself.
-
- SEE ALSO
- BuildPathListTagList(), CopyPathList(), CopyWorkbenchPathList()
-
- dospath.library/GetProcessPathList dospath.library/GetProcessPathList
-
- NAME
- GetProcessPathList -- Get the path list of a process
-
- SYNOPSIS
- head = GetProcessPathList(process)
- D0 A0
-
- struct PathListEntry *GetProcessPathList(struct Process *)
-
- FUNCTION
- Get a pointer to the AmigaDOS CLI command path list of a process.
-
- INPUTS
- process - Pointer to the process
-
- RESULTS
- head - Pointer to head of the old path list. This might be NULL if
- the process is no CLI process.
-
- SEE ALSO
- SetProcessPathList()
-
- dospath.library/RemoveFromPathList dospath.library/RemoveFromPathList
-
- NAME
- RemoveFromPathList - Remove a directory from a path list
-
- SYNOPSIS
- head = RemoveFromPathList(path, lock)
- D0 A0 A1
-
- struct PathListEntry *RemoveFromPathList(struct PathListEntry *, BPTR)
-
- FUNCTION
- This function scans through the path list and deletes the first entry
- which matches the directory lock.
-
- INPUTS
- path - Pointer to head of the path list.
- Passing a NULL argument is harmless.
-
- lock - Directory lock.
- Passing a NULL argument is harmless.
-
- RESULTS
- head - Pointer to head of the path list. This is different from the old
- input path pointer if the head entry was removed.
-
- NOTE
- This function should NOT be used on path lists allocated by AmigaDOS
- itself.
-
- SEE ALSO
- BuildPathListTagList(), CopyPathList()
-
- dospath.library/SetProcessPathList dospath.library/SetProcessPathList
-
- NAME
- SetProcessPathList -- Set the path list of a process
-
- SYNOPSIS
- old = SetProcessPathList(process, head)
- D0 A0 A1
-
- struct PathListEntry *SetProcessPathList(struct Process *,
- struct PathListEntry *)
-
- FUNCTION
- Set the AmigaDOS CLI command path list of a process. A pointer to the
- old path list is returned.
-
- INPUTS
- process - Pointer to the process whose path list should be set.
-
- head - Pointer to head of the new path list.
- Passing a NULL argument is harmless.
-
- RESULTS
- old - Pointer to head of the old path list. This is NULL if the
- process is no CLI process.
-
- NOTE
- You should only use this function on your own process. Don't try to use
- it on other processes which might be using their command path while you
- are changing it!
-
- SEE ALSO
- GetProcessPathList()
-
-
-