From 7c8eeadabf91a648051a16ff2234f2067c97a32b Mon Sep 17 00:00:00 2001 From: Zoltan Somogyi Date: Thu, 17 Dec 2015 00:07:11 +1100 Subject: [PATCH] Fix comments. --- runtime/mercury_string.h | 4 ++-- runtime/mercury_trace_base.c | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/runtime/mercury_string.h b/runtime/mercury_string.h index f96f136d3..248581c7c 100644 --- a/runtime/mercury_string.h +++ b/runtime/mercury_string.h @@ -432,14 +432,14 @@ MR_String MR_make_string(MR_AllocSiteInfoPtr alloc_id, const char *fmt, ...); /* ** Advance `*pos' to the beginning of the next code point in `s'. -** If `*pos' is already at the end of the string then return MR_FALSE +** If `*pos' is already at the end of the string, return MR_FALSE ** without modifying `*pos'. */ extern MR_bool MR_utf8_next(const MR_String s_, MR_Integer *pos); /* ** Rewind `*pos' to the beginning of the previous code point in `s'. -** If `*pos' is already at the beginning of the string then return MR_FALSE +** If `*pos' is already at the beginning of the string, return MR_FALSE ** without modifying `*pos'. */ extern MR_bool MR_utf8_prev(const MR_String s_, MR_Integer *pos); diff --git a/runtime/mercury_trace_base.c b/runtime/mercury_trace_base.c index 7c03b41e9..2f00a1656 100644 --- a/runtime/mercury_trace_base.c +++ b/runtime/mercury_trace_base.c @@ -231,6 +231,8 @@ MR_trace_lookup_trace_count(const MR_LabelLayout *label_layout) return &(module_layout->MR_ml_label_exec_count[label_number]); } +/**************************************************************************/ + #define INIT_MODULE_TABLE_SIZE 10 const MR_ModuleLayout **MR_module_infos; @@ -246,10 +248,11 @@ MR_insert_module_info_into_module_table(const MR_ModuleLayout *module) INIT_MODULE_TABLE_SIZE, MR_ALLOC_SITE_NONE); MR_prepare_insert_into_sorted(MR_module_infos, MR_module_info_next, slot, strcmp(MR_module_infos[slot]->MR_ml_name, module->MR_ml_name)); - MR_module_infos[slot] = module; } +/**************************************************************************/ + static void MR_trace_write_quoted_atom(FILE *fp, const char *atom); static void MR_trace_write_string(FILE *fp, const char *atom); static unsigned MR_trace_write_label_exec_counts_for_file(FILE *fp, @@ -339,7 +342,7 @@ MR_trace_record_label_exec_counts(void *dummy) snprintf(name, name_len, ".%s.%s.%d", MERCURY_TRACE_COUNTS_PREFIX, program_name, getpid()); - /* make sure name is an acceptable filename */ + /* Make sure name is an acceptable filename. */ for (s = name; *s != '\0'; s++) { if (*s == '/') { *s = '_';