Browse Source

Minor fixes

gingerBill 4 years ago
parent
commit
11577db6a8
3 changed files with 7 additions and 7 deletions
  1. 2 1
      core/path/filepath/path_windows.odin
  2. 1 1
      core/strings/strings.odin
  3. 4 5
      src/docs.cpp

+ 2 - 1
core/path/filepath/path_windows.odin

@@ -8,7 +8,8 @@ SEPARATOR :: '\\';
 SEPARATOR_STRING :: `\`;
 SEPARATOR_STRING :: `\`;
 LIST_SEPARATOR :: ';';
 LIST_SEPARATOR :: ';';
 
 
-reserved_names := []string{
+@(private)
+reserved_names := [?]string{
 	"CON", "PRN", "AUX", "NUL",
 	"CON", "PRN", "AUX", "NUL",
 	"COM1", "COM2", "COM3", "COM4", "COM5", "COM6", "COM7", "COM8", "COM9",
 	"COM1", "COM2", "COM3", "COM4", "COM5", "COM6", "COM7", "COM8", "COM9",
 	"LPT1", "LPT2", "LPT3", "LPT4", "LPT5", "LPT6", "LPT7", "LPT8", "LPT9",
 	"LPT1", "LPT2", "LPT3", "LPT4", "LPT5", "LPT6", "LPT7", "LPT8", "LPT9",

+ 1 - 1
core/strings/strings.odin

@@ -224,7 +224,7 @@ index_byte :: proc(s: string, c: byte) -> int {
 	return -1;
 	return -1;
 }
 }
 
 
-// Returns i1 if c is not present
+// Returns -1 if c is not present
 last_index_byte :: proc(s: string, c: byte) -> int {
 last_index_byte :: proc(s: string, c: byte) -> int {
 	for i := len(s)-1; i >= 0; i -= 1 {
 	for i := len(s)-1; i >= 0; i -= 1 {
 		if s[i] == c {
 		if s[i] == c {

+ 4 - 5
src/docs.cpp

@@ -1,6 +1,5 @@
 // Generates Documentation
 // Generates Documentation
 
 
-
 gb_global int print_entity_kind_ordering[Entity_Count] = {
 gb_global int print_entity_kind_ordering[Entity_Count] = {
 	/*Invalid*/     -1,
 	/*Invalid*/     -1,
 	/*Constant*/    0,
 	/*Constant*/    0,
@@ -41,10 +40,9 @@ GB_COMPARE_PROC(cmp_entities_for_printing) {
 	}
 	}
 	int ox = print_entity_kind_ordering[x->kind];
 	int ox = print_entity_kind_ordering[x->kind];
 	int oy = print_entity_kind_ordering[y->kind];
 	int oy = print_entity_kind_ordering[y->kind];
-	if (ox < oy) {
-		return -1;
-	} else if (ox > oy) {
-		return +1;
+	res = ox - oy;
+	if (res != 0) {
+		return res;
 	}
 	}
 	res = string_compare(x->token.string, y->token.string);
 	res = string_compare(x->token.string, y->token.string);
 	return res;
 	return res;
@@ -96,6 +94,7 @@ bool print_doc_comment_group_string(i32 indent, CommentGroup *g) {
 	for_array(i, g->list) {
 	for_array(i, g->list) {
 		String comment = g->list[i].string;
 		String comment = g->list[i].string;
 		bool slash_slash = comment[1] == '/';
 		bool slash_slash = comment[1] == '/';
+		bool slash_star = comment[1] == '*';
 		if (comment[1] == '/') {
 		if (comment[1] == '/') {
 			comment.text += 2;
 			comment.text += 2;
 			comment.len  -= 2;
 			comment.len  -= 2;