Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

Commit

Permalink
Develop fix cite (#1288)
Browse files Browse the repository at this point in the history
* Update Makefile.am
* Update cmdarg.cpp
Fix citation formatting
  • Loading branch information
dchassin committed May 20, 2023
1 parent ed8bec6 commit d809db3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ $(PYENV): requirements.txt
@python$(PYVER)-config --prefix 1>/dev/null || ( echo "ERROR [Makefile]: python$(PYVER)-dev is not installed" > /dev/stderr ; false )
@echo "Processing python requirements..."
@mkdir -p $(PYBIN) $(PYLIB) $(PYINC)
@(deactivate || true ; $(SYSPYTHON) -m venv $(PYENV))
@(deactivate >/dev/null || true ; $(SYSPYTHON) -m venv $(PYENV))
@$(ENVPYTHON) --version 1>/dev/null || ( echo "ERROR [Makefile]: $(ENVPYTHON) is not found" > /dev/stderr ; false )
@$(ENVPYTHON) -m pip install --upgrade pip
@$(ENVPYTHON) -m pip install pandas==2.0.0
Expand Down
14 changes: 7 additions & 7 deletions source/cmdarg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2172,7 +2172,7 @@ DEPRECATED static int cite(void *main, int argc, const char *argv[])
IN_MYCONTEXT output_error("unable to open origin file");
return CMDERR;
}
char url[1024] = "";
char url[1024] = BUILD_URL "/tree/" BUILD_ID;
if ( ! feof(fp) )
{
char line[1024];
Expand All @@ -2191,10 +2191,6 @@ DEPRECATED static int cite(void *main, int argc, const char *argv[])
*end = '\0';
strcpy(url,line+2);
}
else
{
strcpy(url,global_urlbase);
}
}
fclose(fp);

Expand Down Expand Up @@ -2234,13 +2230,17 @@ DEPRECATED static int cite(void *main, int argc, const char *argv[])
output_message("\turl = {%s}",url);
output_message("}");
}
else if (strchr(argv[0],'='))
{
output_error("format '%s' is invalid",strchr(argv[0],'=')+1);
}
else
{
output_message("Chassin, D.P., et al., \"%s %s-%d (%s)"
" %s\" (%d) [online]."
" Available at %s. Accessed %s. %d, %d",
" Available at %s. Accessed %d %s %d.",
PACKAGE_NAME, PACKAGE_VERSION, BUILDNUM, BRANCH,
platform, year, url, Month[month-1], day, year);
platform, year, url, day, Month[month-1], year);
}
global_suppress_repeat_messages = old;
return 0;
Expand Down

0 comments on commit d809db3

Please sign in to comment.