More documentation of ecma 167. Some fields changed names. More

#defines removed/replaced by enum type and variables.
This commit is contained in:
rocky
2005-10-27 11:18:56 +00:00
parent aa46500486
commit 5583cbccd7
7 changed files with 114 additions and 59 deletions

View File

@@ -1,4 +1,5 @@
debug_ecma_167_enums1
debug_ecma_167_timezone_enum
debug_file_characteristics
debug_tagid
debug_udf_enums1

View File

@@ -1,5 +1,5 @@
/*
$Id: udf.c,v 1.2 2005/10/27 01:23:48 rocky Exp $
$Id: udf.c,v 1.3 2005/10/27 11:18:57 rocky Exp $
Copyright (C) 2005 Rocky Bernstein <rocky@panix.com>
@@ -26,6 +26,17 @@
# include <string.h>
#endif
/** The below variables are trickery to force enum symbol values to be
recorded in debug symbol tables. They are used to allow one to refer
to the enumeration value names in the typedefs above in a debugger
and debugger expressions
*/
tag_id_t debug_tagid;
file_characteristics_t debug_file_characteristics;
udf_enum1_t debug_udf_enum1;
ecma_167_enum1_t ecma167_enum1;
ecma_167_timezone_enum_t debug_ecma_167_timezone_enum;
/*!
Returns a string which interpreting the extended attribute permissions
*/
@@ -38,9 +49,9 @@ udf_get_attr_str(udf_Uint32_t permissions, char *result)
result[ 1] = (i_perms & FE_PERM_U_WRITE) ? 'w' : '-';
result[ 2] = (i_perms & FE_PERM_U_EXEC) ? 'x' : '-';
result[ 3] = (i_perms & FE_PERM_G_READ) ? 'r' : '-';
result[ 3] = (i_perms & FE_PERM_G_READ) ? 'r' : '-';
result[ 4] = (i_perms & FE_PERM_G_WRITE) ? 'w' : '-';
result[ 5] = (i_perms & FE_PERM_G_EXEC) ? 'x' : '-';
result[ 5] = (i_perms & FE_PERM_G_EXEC) ? 'x' : '-';
result[ 6] = (i_perms & FE_PERM_O_READ) ? 'r' : '-';
result[ 7] = (i_perms & FE_PERM_O_WRITE) ? 'w' : '-';
@@ -71,5 +82,3 @@ udf_is_dir(const udf_file_t *p_udf_file)
{
return p_udf_file->b_dir;
}

View File

@@ -1,5 +1,5 @@
/*
$Id: udf_fs.c,v 1.8 2005/10/27 01:23:48 rocky Exp $
$Id: udf_fs.c,v 1.9 2005/10/27 11:18:57 rocky Exp $
Copyright (C) 2005 Rocky Bernstein <rocky@panix.com>
@@ -70,16 +70,6 @@ const char VSD_STD_ID_TEA01[] = {'T', 'E', 'A', '0', '1'};
#include <cdio/bytesex.h>
#include "udf_private.h"
/** The below variables are trickery to force enum symbol values to be
recorded in debug symbol tables. They are used to allow one to refer
to the enumeration value names in the typedefs above in a debugger
and debugger expressions
*/
tag_id_t debug_tagid;
file_characteristics_t debug_file_characteristics;
udf_enum1_t debug_udf_enum1;
ecma_167_enum1_t ecma167_enum1;
/*
* The UDF specs are pretty clear on how each data structure is made
* up, but not very clear on how they relate to each other. Here is

View File

@@ -192,6 +192,9 @@ udf_time_to_stamp(udf_timestamp_t *dest, struct timespec ts)
return dest;
}
/*!
Return the modification time of the file.
*/
time_t
udf_get_modification_time(const udf_file_t *p_udf_file)
{
@@ -204,6 +207,9 @@ udf_get_modification_time(const udf_file_t *p_udf_file)
return 0;
}
/*!
Return the access time of the file.
*/
time_t
udf_get_access_time(const udf_file_t *p_udf_file)
{
@@ -216,3 +222,18 @@ udf_get_access_time(const udf_file_t *p_udf_file)
return 0;
}
/*!
Return the attribute (most recent create or access) time of the file
*/
time_t
udf_get_attribute_time(const udf_file_t *p_udf_file)
{
if (p_udf_file) {
time_t ret_time;
long int usec;
udf_stamp_to_time(&ret_time, &usec, p_udf_file->fe.attribute_time);
return ret_time;
}
return 0;
}