Rename src directory to convert

This commit is contained in:
Dietrich Epp 2022-03-23 17:51:55 -04:00
parent 491950e57d
commit bc46e1e982
14 changed files with 15 additions and 15 deletions

View File

@ -1,4 +1,4 @@
#include "src/convert.h" #include "convert/convert.h"
struct ConvertEngine { struct ConvertEngine {
ConvertBuildf build; ConvertBuildf build;

View File

@ -2,7 +2,7 @@
#define convert_h #define convert_h
/* convert.h - character set conversion routines. */ /* convert.h - character set conversion routines. */
#include "src/defs.h" #include "convert/defs.h"
/* Error codes. */ /* Error codes. */
enum enum

View File

@ -1,6 +1,6 @@
/* convert_1f.c - Forward conversion from extended ASCII to UTF-8. */ /* convert_1f.c - Forward conversion from extended ASCII to UTF-8. */
#include "src/convert.h" #include "convert/convert.h"
#include "src/defs.h" #include "convert/defs.h"
struct Convert1fData { struct Convert1fData {
/* Unicode characters, encoded in UTF-8, and packed MSB first. Always either /* Unicode characters, encoded in UTF-8, and packed MSB first. Always either

View File

@ -1,6 +1,6 @@
/* convert_1r.c - Reverse conversion from UTF-8 to extended ASCII. */ /* convert_1r.c - Reverse conversion from UTF-8 to extended ASCII. */
#include "src/convert.h" #include "convert/convert.h"
#include "src/defs.h" #include "convert/defs.h"
enum enum
{ {

View File

@ -1,8 +1,8 @@
/* Converter test. */ /* Converter test. */
#define _XOPEN_SOURCE 500 #define _XOPEN_SOURCE 500
#include "src/convert.h" #include "convert/convert.h"
#include "src/test.h" #include "convert/test.h"
#include <errno.h> #include <errno.h>
#include <stdarg.h> #include <stdarg.h>
@ -74,7 +74,7 @@ static void ReadFile(const char *filename, void **datap, size_t *sizep)
size_t size, alloc, newalloc, amt; size_t size, alloc, newalloc, amt;
int err; int err;
StringPrintf(fnbuf, sizeof(fnbuf), "src/%s", filename); StringPrintf(fnbuf, sizeof(fnbuf), "convert/%s", filename);
fp = fopen(fnbuf, "rb"); fp = fopen(fnbuf, "rb");
if (fp == NULL) { if (fp == NULL) {

View File

@ -2,7 +2,7 @@
#define test_h #define test_h
/* test.h - unit testing definitions. */ /* test.h - unit testing definitions. */
#include "src/defs.h" #include "convert/defs.h"
/* List of all data files, terminated by NULL. */ /* List of all data files, terminated by NULL. */
extern const char *const kCharsetFilename[]; extern const char *const kCharsetFilename[];

View File

@ -3,8 +3,8 @@
This is used to run conversion tests on non-Mac OS systems to make This is used to run conversion tests on non-Mac OS systems to make
development easier. These are not intended to make it possible to port the development easier. These are not intended to make it possible to port the
converter to non-Mac OS systems. */ converter to non-Mac OS systems. */
#include "src/defs.h" #include "convert/defs.h"
#include "src/test.h" #include "convert/test.h"
#include <stdarg.h> #include <stdarg.h>
#include <stdio.h> #include <stdio.h>

View File

@ -11,7 +11,7 @@ func writeFilenames(charmaps []string, filename string) error {
w := s.writer w := s.writer
w.WriteString(header) w.WriteString(header)
w.WriteString( w.WriteString(
"#include \"src/test.h\"\n" + "#include \"convert/test.h\"\n" +
"const char *const kCharsetFilename[] = {\n") "const char *const kCharsetFilename[] = {\n")
for _, fn := range charmaps { for _, fn := range charmaps {
if fn != "" { if fn != "" {

View File

@ -44,7 +44,7 @@ func mainE() error {
} }
destdir := flagDest destdir := flagDest
if destdir == "" { if destdir == "" {
destdir = filepath.Join(srcdir, "src") destdir = filepath.Join(srcdir, "convert")
} }
// Read metadata. // Read metadata.

View File

@ -79,7 +79,7 @@ func writeMap(d *scriptdata, m []*scriptmap, filename string) error {
w := s.writer w := s.writer
w.WriteString(header) w.WriteString(header)
w.WriteString( w.WriteString(
"#include \"src/convert.h\"\n" + "#include \"convert/convert.h\"\n" +
"int GetCharmap(int script, int region) {\n" + "int GetCharmap(int script, int region) {\n" +
"switch (script) {\n") "switch (script) {\n")
for _, s := range m { for _, s := range m {