! ----- CREATE_ROOT_DIRECTORY.FUN ----- ! ! ----- SUBROUTINE TO CREATE THE ROOT DIRECTORY FOR THIS USER ----- ! ! ----- Last Change 07/06/93 by Brian Lomasky ----- ! SUB CREATE_ROOT_DIRECTORY %INCLUDE "NUSER.INC" ! ----- SYSTEM SERVICE ERROR CODES AND FUNCTION VALUES ----- EXTERNAL LONG CONSTANT SS$_CREATED ! FILE WAS CREATED - SUCCESS DECLARE LONG LOCAL_STATUS ! LOCAL SYSTEM SERVICE EXIT STAT DECLARE WORD TEMP ! TEMPORARY WORD VARIABLE DECLARE STRING TEMP_STRING ! TEMPORARY STRING VARIABLE EXTERNAL LONG FUNCTION LIB$CREATE_DIR ! CREATE DIRECTORY TEMP_STRING = LEFT(THE_DEVICE, DEVICE_LENGTH) + & LEFT(DIRECTORY_NAME, DIRECTORY_NAME_LENGTH) ! ----- CREATE PROTECTION MASK FOR DIRECTORY ----- TEMP = -1536% ! (S:RWED,O:RWED,G:RE,W) PRINT "Creating user's directory..." ! ----- (SS$_NORMAL returned if dir already exists) ----- LOCAL_STATUS = LIB$CREATE_DIR(TEMP_STRING, UIC, TEMP, TEMP) LOCAL_STATUS = SS$_NORMAL IF LOCAL_STATUS = SS$_CREATED IF LOCAL_STATUS <> SS$_NORMAL THEN PRINT "CREATE_ROOT_DIRECTORY Error while" + & " creating user's directory" + BEL CALL LIB$STOP(LOCAL_STATUS BY VALUE) END IF END SUB