Skip to content

Commit

Permalink
Version 3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
matyler committed Feb 25, 2018
1 parent 9d579f3 commit 3e9999d
Show file tree
Hide file tree
Showing 641 changed files with 19,129 additions and 102,258 deletions.
5 changes: 4 additions & 1 deletion README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ For instructions on how to use it, and why it was created, read the handbook loc

./mtcelledit/handbook/en_GB/index.html

or on the web:

http://mtcelledit.sourceforge.net/handbook/en_GB/index.html

If you find any bugs, or you have suggestions for improvements you can contact me at this address:

marktyler@users.sourceforge.net
mt@marktyler.org
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0
3.1
128 changes: 66 additions & 62 deletions libmtcedui/NEWS.txt
Original file line number Diff line number Diff line change
@@ -1,62 +1,66 @@
3.0 2017-2-24

* Moved to C++.

2.7 2016-5-14

* mtFont inherited from old libmtIMG.
* Graph, Sheet output export text now rendered with Pango. Enables font substitution, kerning, etc.
* Exports of sheet output now space rows more generously to fit in borders better.
* BUGFIX - Exporting a vector graph now has better clipping accuracy for lines of width 1.

2.6 2015-9-6

2.5 2015-5-24

* Namespace is now uniform.
* Location for temporary clipboard data is ~/.cache/libmtCedUI/clipboard.ledger.zip

2.4 2014-8-10

* unsigned int types cleaned up.
* Hardening: sprintf -> snprintf.
* BUGFIX - ced_graph_render_mtimage() on big endian systems.
* BUGFIX - cuf_file_save() on failure returns correct value in all cases.
* mtCedUI renamed to libmtCedUI.

2.3 2014-2-22

* cuf_clip_export_text() now removes trailing space.

2.2 2013-8-25

* Simplifications, cruft removal, and other housekeeping.
* BUGFIX - loading a file that contains a relative symlink is now resolved properly.

2.1 2013-3-24

* CedUI_file & CedUI_clip structures and functions added.
* BUGFIX - paged PDF files now don't paint cell borders to left of first column (when text overflows from a page to the left of the first column).
* BUGFIX - Zombie cell prefs are now correctly removed.

2.0 2012-3-25

* Cleanups & re-factoring.
* Graphs can now be scaled.

1.6.0 2012-1-25

* Renamed as mtcedui, and broadened to include any toolkit agnostic facilities.
* ced_graph_render_cairo_file -> ced_graph_render_file.

1.4.1 2011-8-14

* Line and bar graphs must have valid cell types for each data point.
* Line graphs are now discontinuous when data cells are empty.

1.4.0 2011-4-25

1.3.0 2011-1-8

* Project started (mtcedgraph)

3.1 2018-2-25

* cui_get_correct_*_filename() added.

3.0 2017-2-24

* Moved to C++.

2.7 2016-5-14

* mtFont inherited from old libmtIMG.
* Graph, Sheet output export text now rendered with Pango. Enables font substitution, kerning, etc.
* Exports of sheet output now space rows more generously to fit in borders better.
* BUGFIX - Exporting a vector graph now has better clipping accuracy for lines of width 1.

2.6 2015-9-6

2.5 2015-5-24

* Namespace is now uniform.
* Location for temporary clipboard data is ~/.cache/libmtCedUI/clipboard.ledger.zip

2.4 2014-8-10

* unsigned int types cleaned up.
* Hardening: sprintf -> snprintf.
* BUGFIX - ced_graph_render_mtimage() on big endian systems.
* BUGFIX - cuf_file_save() on failure returns correct value in all cases.
* mtCedUI renamed to libmtCedUI.

2.3 2014-2-22

* cuf_clip_export_text() now removes trailing space.

2.2 2013-8-25

* Simplifications, cruft removal, and other housekeeping.
* BUGFIX - loading a file that contains a relative symlink is now resolved properly.

2.1 2013-3-24

* CedUI_file & CedUI_clip structures and functions added.
* BUGFIX - paged PDF files now don't paint cell borders to left of first column (when text overflows from a page to the left of the first column).
* BUGFIX - Zombie cell prefs are now correctly removed.

2.0 2012-3-25

* Cleanups & re-factoring.
* Graphs can now be scaled.

1.6.0 2012-1-25

* Renamed as mtcedui, and broadened to include any toolkit agnostic facilities.
* ced_graph_render_cairo_file -> ced_graph_render_file.

1.4.1 2011-8-14

* Line and bar graphs must have valid cell types for each data point.
* Line graphs are now discontinuous when data cells are empty.

1.4.0 2011-4-25

1.3.0 2011-1-8

* Project started (mtcedgraph)

64 changes: 15 additions & 49 deletions libmtcedui/mtConf.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/sh
# THIS FILE IS A COPIED TEMPLATE! - Only edit in /pkg/src/
# Configure script helper functions
# M.Tyler 2013-2-9

Expand All @@ -23,46 +24,6 @@ UNDERLINE_TEXT()
}


MTCF_MAKEFILE_CLEANUP()
{
# On error exit
set -e

find . -name Makefile.gnulinux |
while read FNAME
do
ONAME=$(echo $FNAME | sed 's/\.gnulinux$//')
mv "$FNAME" "$ONAME"
done

# On error don't exit
set +e
}

MTCF_MAKEFILE_SETUP()
{
# Revert to original Makefile's
MTCF_MAKEFILE_CLEANUP

# On error exit
set -e

find . -name Makefile |
while read FNAME
do
# Only move current Makefile if preferred alternative exists
if [ -f "$FNAME.$1" ]
then
mv "$FNAME" "$FNAME.gnulinux"
cp "$FNAME.$1" "$FNAME"
fi
done

# On error don't exit
set +e
}


MTCF_INIT()
{
CWD=$(pwd)
Expand Down Expand Up @@ -93,7 +54,7 @@ MTCF_INIT()
LIB_INSTALL="$PREFIX/lib"
DATA_INSTALL="$PREFIX/share"

MAN_INSTALL="/usr/share/man/man1"
MAN_INSTALL="$DATA_INSTALL/man/man1"
}


Expand All @@ -106,8 +67,7 @@ MTCF_PARSE_ARG1()
make clean
echo
rm $CONF_FILE
MTCF_MAKEFILE_CLEANUP
exit
exit 0
;;

"debug" ) DEBUG=YES
Expand All @@ -124,15 +84,15 @@ MTCF_PARSE_ARG1()
echo
echo "File already exists: ~/$ARNAME"
echo
exit
exit 1
fi
cd ..
tar cJvf ~/$ARNAME $PKNAME
exit
;;

"wc" ) wc $(find ./src -name \*.c -o -name \*.h -o -name \*.yy -o -name \*.cpp)
exit
exit 0
;;

"--help" ) HELP=1
Expand All @@ -143,6 +103,7 @@ MTCF_PARSE_ARG1()
LIB_INSTALL="$MT_PREFIX/lib"
HEAD_INSTALL="$MT_PREFIX/include"
DATA_INSTALL="$MT_PREFIX/share"
MAN_INSTALL="$DATA_INSTALL/man/man1"
;;

"--bindir="* ) BIN_INSTALL=$(echo "$A" | sed "s/--bindir=//")
Expand Down Expand Up @@ -196,7 +157,7 @@ Options:
flush ........... Flush directories to initial state
debug ........... Include debugging info in binary c11 c++14
debugold ........ Include debugging info in binary c99 c++03
debugold ........ Include debugging info in binary c11 c++11
wc .............. Count size of source files
--prefix=DIR .......... DIR = prefix location of all installs (default=/usr)
Expand All @@ -214,7 +175,7 @@ EOF
$1
fi

exit
exit 0
fi
}

Expand All @@ -238,8 +199,8 @@ MTCF_PRE_CONF()
"OLD" )
I_EX="$DEBUG_I_EX"
L_EX="-lm -O1 -Wl,--as-needed,-z,relro,-z,now"
CFLAGS="$CFLAGS -std=gnu99 -Wbad-function-cast -Wstrict-prototypes -Wnested-externs"
CXXFLAGS="$CXXFLAGS -std=gnu++03"
CFLAGS="$CFLAGS -std=gnu11 -Wbad-function-cast -Wstrict-prototypes -Wnested-externs"
CXXFLAGS="$CXXFLAGS -std=gnu++11"
;;
esac

Expand Down Expand Up @@ -281,6 +242,11 @@ MTCF_VERSION_BIN_NAME()
then
I_EX="$I_EX -DBIN_NAME=\"\\\"$BIN_NAME\"\\\""
fi

if [ "$LIB_NAME" != "" ]
then
I_EX="$I_EX -DVERNUM=\"\\\"$VERNUM\"\\\""
fi
}


Expand Down
14 changes: 7 additions & 7 deletions libmtcedui/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ include ../_conf.txt
LIB_SONAME = $(LIB_NAME).1
HEADER = mtcedui.h
OBJS = \
u_clip.o \
u_dup.o \
u_file.o \
u_graph.o \
u_prefs.o \
u_render.o \
u_undo.o \
cui_clip.o \
cui_dup.o \
cui_file.o \
cui_graph.o \
cui_prefs.o \
cui_render.o \
cui_undo.o \


.PHONY: all install uninstall clean
Expand Down
7 changes: 3 additions & 4 deletions libmtcedui/src/u_clip.cpp → libmtcedui/src/cui_clip.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (C) 2012-2016 Mark Tyler
Copyright (C) 2012-2017 Mark Tyler
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -77,10 +77,9 @@ int cui_clip_set_timestamp (

CuiClip * cui_clip_new ( void )
{
CuiClip * clipboard;
CuiClip * const clipboard = (CuiClip *)
( calloc ( sizeof ( CuiClip ), 1 ) );


clipboard = (CuiClip *)calloc ( sizeof ( CuiClip ), 1 );
if ( ! clipboard )
{
return NULL;
Expand Down
16 changes: 7 additions & 9 deletions libmtcedui/src/u_dup.cpp → libmtcedui/src/cui_dup.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (C) 2010-2016 Mark Tyler
Copyright (C) 2010-2017 Mark Tyler
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -43,10 +43,7 @@ static int duplicate_name (
void * const user_data
)
{
size_t size;
char * new_name = NULL, * cp;
int next_id,
res = 0;
int res = 0;


if ( ! name || ! callback )
Expand All @@ -55,15 +52,15 @@ static int duplicate_name (
}

// Create space for a large number + brackets/space
size = strlen ( name );
size_t size = strlen ( name );

// Check overflow
if ( size > (SIZE_MAX - DUP_STR_EXTRA) )
{
return CUI_ERROR_NO_CHANGES;
}

new_name = (char *)calloc ( size + DUP_STR_EXTRA, 1 );
char * new_name = (char *)calloc ( size + DUP_STR_EXTRA, 1 );

if ( ! new_name )
{
Expand All @@ -72,7 +69,7 @@ static int duplicate_name (

mtkit_strnncpy ( new_name, name, size + DUP_STR_EXTRA );

next_id = FIRST_DUPLICATE_ID;
int next_id = FIRST_DUPLICATE_ID;

// Find out if this name is already a duplicate - if so use its number
if ( size > 3 && new_name[size - 1] == ')' )
Expand All @@ -81,7 +78,8 @@ static int duplicate_name (
new_name[size - 1] = 0;

// Chop off the last ' (%i)'
cp = strrchr ( new_name, '(' );
char * const cp = strrchr ( new_name, '(' );

if ( cp > new_name &&
cp[-1] == ' ' &&
! mtkit_strtoi ( cp + 1, &next_id, NULL, 1 ) &&
Expand Down
Loading

0 comments on commit 3e9999d

Please sign in to comment.