Add a Client32 NCP87 helper for obtaining DOS namespace file and subdirectory information and use it in NDIR. The new helper reads the classic NCP87 subfunction 6 RIM_ALL DOS info block, including timestamps, inherited rights, directory identifiers and size metadata. Use the NCP87 inherited rights mask for the inherited-rights column while keeping the existing Client32 effective-rights path for the effective rights column. Also use the NCP87 modify, archive, last-access and creation date fields for the /DATES display, falling back to DOS findfirst timestamps when the NCP87 info request is not available. Tighten the /DATES layout so the full Created/Copied timestamp remains within an 80-column DOS screen.
91 lines
3.2 KiB
C
91 lines
3.2 KiB
C
/* c32ncp.h - minimal Client32 NCP helpers for mars-dosutils */
|
|
|
|
#ifndef C32NCP_H
|
|
#define C32NCP_H
|
|
int c32_get_ncp_handle(uint16 *handle_lo, uint16 *handle_hi);
|
|
|
|
int c32_ncp87_obtain_rim_attributes(const char *name,
|
|
uint16 dir_handle,
|
|
uint32 *attr_out,
|
|
uint16 *actual_out,
|
|
uint16 *handle_lo_out,
|
|
uint16 *handle_hi_out);
|
|
|
|
|
|
typedef struct c32_ndir_info {
|
|
uint32 space_allocated;
|
|
uint32 attributes;
|
|
uint16 flags;
|
|
uint32 data_size;
|
|
uint32 total_size;
|
|
uint16 number_of_streams;
|
|
uint16 creation_time;
|
|
uint16 creation_date;
|
|
uint32 creator_id;
|
|
uint16 modify_time;
|
|
uint16 modify_date;
|
|
uint32 modifier_id;
|
|
uint16 last_access_date;
|
|
uint16 archive_time;
|
|
uint16 archive_date;
|
|
uint32 archiver_id;
|
|
uint16 inherited_rights;
|
|
uint32 dir_ent_num;
|
|
uint32 dos_dir_num;
|
|
uint32 vol_number;
|
|
uint32 ea_data_size;
|
|
uint32 ea_key_count;
|
|
uint32 ea_key_size;
|
|
uint32 ns_creator;
|
|
uint8 name_len;
|
|
char name[256];
|
|
} C32_NDIR_INFO;
|
|
|
|
int c32_ncp87_obtain_ndir_info(const char *path_name,
|
|
uint16 dir_handle,
|
|
C32_NDIR_INFO *info_out,
|
|
uint16 *actual_out,
|
|
uint16 *handle_lo_out,
|
|
uint16 *handle_hi_out);
|
|
|
|
|
|
int c32_ncp87_modify_dos_attributes(char *name,
|
|
uint16 dir_handle,
|
|
uint32 attrs,
|
|
uint16 *actual_out,
|
|
uint16 *handle_lo_out,
|
|
uint16 *handle_hi_out);
|
|
|
|
int c32_ncp87_get_effective_rights(const char *path,
|
|
uint16 dir_handle,
|
|
uint16 *rights_out,
|
|
uint16 *actual_out,
|
|
uint16 *handle_lo_out,
|
|
uint16 *handle_hi_out);
|
|
|
|
int c32_ncp87_add_trustee_rights(const char *path_name,
|
|
uint16 dir_handle,
|
|
uint32 object_id,
|
|
uint16 rights,
|
|
uint16 rights_mask,
|
|
uint16 *actual_out,
|
|
uint16 *handle_lo_out,
|
|
uint16 *handle_hi_out);
|
|
|
|
int c32_ncp87_find_trustee_rights(const char *path_name,
|
|
uint16 dir_handle,
|
|
uint32 object_id,
|
|
uint16 *rights_out,
|
|
uint16 *actual_out,
|
|
uint16 *handle_lo_out,
|
|
uint16 *handle_hi_out);
|
|
|
|
int c32_ncp87_delete_trustee_rights(const char *path_name,
|
|
uint16 dir_handle,
|
|
uint32 object_id,
|
|
uint16 *actual_out,
|
|
uint16 *handle_lo_out,
|
|
uint16 *handle_hi_out);
|
|
|
|
#endif
|