Add first implementation of dosmangle 8.3 support for long file names
Some checks are pending
Source release / source-package (push) Waiting to run

This commit is contained in:
Mario Fetka
2026-05-19 22:11:28 +02:00
parent 349c876788
commit 3140e3fd8f
5 changed files with 482 additions and 55 deletions

34
include/dosmangle.h Normal file
View File

@@ -0,0 +1,34 @@
#ifndef _DOSMANGLE_H_
#define _DOSMANGLE_H_
/*
* dosmangle.h
*
* Centralized DOS 8.3 short-name support for MARS_NWE.
*/
#include "net.h"
#include "nwvolume.h"
#define DOS83_NAME_MAX 13 /* 8 + '.' + 3 + NUL */
int dos83_is_valid_name(const uint8 *name, int options);
int dos83_build_name_in_dir(const char *dir_unix,
const uint8 *src,
uint8 *out,
int out_size,
int options);
int dos83_match_name_in_dir(const char *dir_unix,
const uint8 *unix_name,
const uint8 *dos_pattern,
int options,
uint8 *out_dos_name,
int out_dos_name_size);
int dos83_resolve_component(const char *dir_unix,
const uint8 *dos_name,
uint8 *resolved_name,
int resolved_size,
int options);
void mangle_dos_name(NW_VOL *vol, uint8 *unixname, uint8 *pp);
#endif