a1200   NEWS   APPS   DOCS   ABOUT
a1200
----
a1200
----
Autodocs
 Libraries:
 dos.library
  AbortPkt
  AddBuffers
  AddDosEntry
  AddPart
  AddSegment
  AllocDosObject
  AssignAdd
  AssignLate
  AssignLock
  AssignPath
  AttemptLockDosList
  ChangeMode
  CheckSignal
  Cli
  CliInitNewcli
  CliInitRun
  Close
  CompareDates
  CreateDir
  CreateNewProc
  CreateProc
  CurrentDir
  DateStamp
  DateToStr
  Delay
  DeleteFile
  DeleteVar
  DeviceProc
  DoPkt
  DupLock
  DupLockFromFH
  EndNotify
  ErrorReport
  ExAll
  ExAllEnd
  ExNext
  Examine
  ExamineFH
  Execute
  Exit
  FGetC
  FGets
  FPutC
  FPuts
  FRead
  FWrite
  Fault
  FilePart
  FindArg
  FindCliProc
  FindDosEntry
  FindSegment
  FindVar
  Flush
  Format
  FreeArgs
  FreeDeviceProc
  FreeDosEntry
  FreeDosObject
  GetArgStr
  GetConsoleTask
  GetCurrentDirName
  GetDeviceProc
  GetFileSysTask
  GetProgramDir
  GetProgramName
  GetPrompt
  GetVar
  Info
  Inhibit
  Input
  InternalLoadSeg
  InternalUnLoadSeg
  IoErr
  IsFileSystem
  IsInteractive
  LoadSeg
  Lock
  LockDosList
  LockRecord
  LockRecords
  MakeDosEntry
  MakeLink
  MatchEnd
  MatchFirst
  MatchNext
  MatchPattern
  MatchPatternNoCase
  MaxCli
  NameFromFH
  NameFromLock
  NewLoadSeg
  NextDosEntry
  Open
  OpenFromLock
  Output
  ParentDir
  ParentOfFH
  ParsePattern
  ParsePatternNoCase
  PathPart
  PrintFault
  PutStr
  Read
  ReadArgs
  ReadItem
  ReadLink
  Relabel
  RemAssignList
  RemDosEntry
  RemSegment
  Rename
  ReplyPkt
  RunCommand
  SameDevice
  SameLock
  Seek
  SelectInput
  SelectOutput
  SendPkt
  SetArgStr
  SetComment
  SetConsoleTask
  SetCurrentDirName
  SetFileDate
  SetFileSize
  SetFileSysTask
  SetIoErr
  SetMode
  SetOwner
  SetProgramDir
  SetProgramName
  SetPrompt
  SetProtection
  SetVBuf
  SetVar
  SplitName
  StartNotify
  StrToDate
  StrToLong
  SystemTagList
  UnGetC
  UnLoadSeg
  UnLock
  UnLockDosList
  UnLockRecord
  UnLockRecords
  VFPrintf
  VFWritef
  VPrintf
  WaitForChar
  WaitPkt
  Write
  WriteChars
Include
GuruMeditation
Docs » Autodocs » dos.library » CliInitNewcli

NAME

	CliInitNewcli -- Set up a process to be a shell from initial packet

SYNOPSIS

	flags = CliInitNewcli( packet )
D0 A0
LONG CliInitNewcli( struct DosPacket * )

FUNCTION

	This function initializes a process and CLI structure for a new
shell, from parameters in an initial packet passed by the system
(NewShell or NewCLI, etc). The format of the data in the packet
is purposely not defined. The setup includes all the normal fields
in the structures that are required for proper operation (current
directory, paths, input streams, etc).
It returns a set of flags containing information about what type
of shell invocation this is.
Definitions for the values of fn:
Bit 31 Set to indicate flags are valid
Bit 3 Set to indicate asynch system call
Bit 2 Set if this is a System() call
Bit 1 Set if user provided input stream
Bit 0 Set if RUN provided output stream
If Bit 31 is 0, then you must check IoErr() to determine if an error
occurred. If IoErr() returns a pointer to your process, there has
been an error, and you should clean up and exit. The packet will
have already been returned by CliInitNewcli(). If it isn't a pointer
to your process and Bit 31 is 0, reply the packet immediately.
(Note: this is different from what you do for CliInitRun().)
This function is very similar to CliInitRun().

INPUTS

	packet - the initial packet sent to your process MsgPort

RESULT

	fn - flags or a pointer

SEE ALSO

CliInitRun(), ReplyPkt(), WaitPkt(), IoErr()

Comments

Name:
E-mail: Use this if you want a message if you get a response, will not be shown.
Comment:
Select correct short for:

Dual Crew

DC
AFL
AOA
ATX

Comments:

$VER: d0.se 1.14 Copyright © 2011-2021 Tobias Geijersson support at d0 dot se