printf("This system is big-endian.\n");
}
printf("\n");
- printf("Copyright (c) Nishi 2024\n");
+ printf("%s\n", dataworks_get_copyright());
printf("All rights reserved.\n");
if(create) {
printf("\n");
| Name | Size | Type | Info |
| ---- | ---- | ---- | ---- |
| version | 2 bytes | uint16\_t | MUST be 1 for 1.0 |
+| mtime | 8 bytes | int64\_t | Last modified time of the database |
`infoentry` IS the only thing which SHOULD be compatible in later format.
File MUST look like this:
| ---- | ---- |
| `signature` | |
| `infoentry` | |
-| uint64\_t | Last modified time of the database |
| `indexentry` | 1st one |
| `indexentry` | 2nd one |
| ... | |
nul[0] = 0;
nul[1] = 1;
fwrite(nul, 1, 2, f);
- uint64_t t = time(NULL);
- __dw_big_endian(t, uint64_t, fwrite(__converted_ptr, 1, 8, f));
+ int64_t t = time(NULL);
+ __dw_big_endian(t, int64_t, fwrite(__converted_ptr, 1, 8, f));
for(i = 0; i < 16; i++) nul[i] = 0;
for(i = 0; i < 256; i++) {
fwrite(nul, 1, 1, f);
const char* dataworks_version = "0.0.0";
const char* dataworks_compile_date = __DATE__;
+const char* dataworks_copyright = "Copyright (c) Crabware 2024";
#if defined(__MINGW32__)
const char* dataworks_platform = "Windows/"
volatile unsigned short n = 1;
return *(char*)&n == 1 ? 'L' : 'B';
}
+
+const char* dataworks_get_copyright(void){
+ return dataworks_copyright;
+}
/**
* @~english
- * @brief Get the compilation endian of DataWorks
- * @return Compilation endian of DataWorks
+ * @brief Get the Endian of the platform
+ * @return Endian of the platform
*
*/
char dataworks_get_endian(void);
+/**
+ * @~english
+ * @brief Get the copyright of DataWorks
+ * @return Copyright of DataWorks
+ *
+ */
+const char* dataworks_get_copyright(void);
+
#ifdef __cplusplus
}
#endif