Compare commits

...

7 Commits

5 changed files with 54 additions and 25 deletions

View File

@@ -12,11 +12,11 @@ all: src/Makefile
@$(MAKE) -C rem2pdf -f Makefile.top
install:
@echo ""
@echo "*********************"
@echo "* *"
@echo "* Installing REMIND *"
@echo "* *"
@echo "*********************"
@echo "**********************************"
@echo "* *"
@echo "* Installing REMIND (unstripped) *"
@echo "* *"
@echo "**********************************"
@echo ""
@$(MAKE) -C src install
@$(MAKE) -C rem2html install
@@ -27,15 +27,15 @@ clean:
-$(MAKE) -C src clean
-$(MAKE) -C rem2pdf clean
install-nostripped:
install-stripped:
@echo ""
@echo "**********************************"
@echo "* *"
@echo "* Installing REMIND (unstripped) *"
@echo "* *"
@echo "********************************"
@echo "* *"
@echo "* Installing REMIND (stripped) *"
@echo "* *"
@echo "**********************************"
@echo ""
@$(MAKE) -C src install-nostripped
@$(MAKE) -C src install-stripped
@$(MAKE) -C rem2html install
@$(MAKE) -C rem2pdf -f Makefile.top install INSTALL_BASE=$(INSTALL_BASE)

View File

@@ -16,8 +16,12 @@ CHANGES TO REMIND
output is going to terminal, "FILE" if it's redirected to a plain file,
or "PIPE" if it's going to a pipe. See the man page for all the details.
- IMPROVEMENT: Add "make install-nostripped" top-level target for people who
want to build Remind with debugging symbols intact.
- CHANGE: "make install" now no longer strips debugging symbols from the
remind and rem2ps executables. Use "make install-stripped" if you want
them stripped.
- CHANGE: remind: "remind -c" highlights today's date in bold, if
colors are enabled.
- DOCUMENTATION FIX: Document behavior of DO and filedir() with respect
to symbolic links.

View File

@@ -50,7 +50,7 @@ rem2ps: rem2ps.o dynbuf.o json.o
remind: $(REMINDOBJS)
@CC@ @CFLAGS@ @LDFLAGS@ $(LDEXTRA) -o remind $(REMINDOBJS) @LIBS@
install-nostripped: all
install: all
-mkdir -p $(DESTDIR)$(bindir) || true
for prog in $(PROGS) $(SCRIPTS) ; do \
$(INSTALL_PROGRAM) $$prog $(DESTDIR)$(bindir) || exit 1; \
@@ -64,7 +64,7 @@ install-nostripped: all
-mkdir -p $(DESTDIR)$(datarootdir)/remind || true
cp -R ../include/* $(DESTDIR)$(datarootdir)/remind
install: install-nostripped
install-stripped: install
strip $(DESTDIR)$(bindir)/remind || true
strip $(DESTDIR)$(bindir)/rem2ps || true

View File

@@ -301,8 +301,8 @@ static void WriteCalDays (void);
static int
DayOf(int jul)
{
int y, m, d;
FromJulian(jul, &y, &m, &d);
int d;
FromJulian(jul, NULL, NULL, &d);
return d;
}
@@ -745,7 +745,11 @@ SetShadeEntry(int jul, char const *shade)
}
if (sscanf(shade, "%d %d %d", &r, &g, &b) != 3) {
return;
if (sscanf(shade, "%d", &r) != 1) {
return;
}
g = r;
b = r;
}
if (r < 0 || g < 0 || b < 0 || r > 255 || g > 255 || b > 255) {
return;
@@ -914,10 +918,18 @@ static void DoCalendarOneWeek(int nleft)
snprintf(buf, sizeof(buf), "%d %s ", d, get_month_abbrev(mon));
}
}
if (OrigJul+i == RealToday)
PrintLeft(buf, ColSpaces, '*');
else
if (OrigJul+i == RealToday) {
if (UseVTColors) {
printf("\x1B[1m"); /* Bold */
}
PrintLeft(buf, ColSpaces-1, '*');
if (UseVTColors) {
printf("\x1B[0m"); /* Normal */
}
putchar(' ');
} else {
PrintLeft(buf, ColSpaces, ' ');
}
gon();
DRAW(tb);
goff();
@@ -1129,7 +1141,13 @@ static int WriteCalendarRow(void)
}
}
if (Julian(y, m, d+i-wd) == RealToday) {
if (UseVTColors) {
printf("\x1B[1m"); /* Bold */
}
PrintLeft(buf, ColSpaces-1, '*');
if (UseVTColors) {
printf("\x1B[0m"); /* Normal */
}
putchar(' ');
} else {
PrintLeft(buf, ColSpaces, ' ');

View File

@@ -329,7 +329,8 @@ int Julian(int year, int month, int day)
/* */
/* FromJulian */
/* */
/* Convert a Julian date to year, month, day. */
/* Convert a Julian date to year, month, day. You may supply */
/* NULL for y, m or d if you're not interested in that value */
/* */
/***************************************************************/
void FromJulian(int jul, int *y, int *m, int *d)
@@ -358,9 +359,15 @@ void FromJulian(int jul, int *y, int *m, int *d)
try_mon++;
t = DaysInMonth(try_mon, try_yr);
}
*y = try_yr;
*m = try_mon;
*d = jul + 1;
if (y) {
*y = try_yr;
}
if (m) {
*m = try_mon;
}
if (d) {
*d = jul + 1;
}
return;
}