diff options
Diffstat (limited to 'src/main/print-dither-matrices.c')
-rw-r--r-- | src/main/print-dither-matrices.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/print-dither-matrices.c b/src/main/print-dither-matrices.c index 021fa70..7047f5e 100644 --- a/src/main/print-dither-matrices.c +++ b/src/main/print-dither-matrices.c @@ -15,8 +15,7 @@ * for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * along with this program. If not, see <https://www.gnu.org/licenses/>. * * Revision History: * @@ -33,6 +32,7 @@ #include <stdlib.h> #include <stdio.h> #include "dither-impl.h" +#include <sys/param.h> #ifdef __GNUC__ #define inline __inline__ @@ -580,7 +580,7 @@ stpi_dither_array_create_from_xmltree(stp_mxml_node_t *dm, int x, int y) /* Dith } /* Now read in the array */ - child = stp_mxmlFindElement(dm, dm, "array", NULL, NULL, STP_MXML_DESCEND); + child = stp_xml_get_node(dm, "array", NULL); if (child) return stp_array_create_from_xmltree(child); else @@ -665,8 +665,8 @@ stp_xml_get_dither_array(int x, int y) if (!cachedval) { - char buf[1024]; - (void) sprintf(buf, "dither-matrix-%dx%d.xml", x, y); + char buf[MAXPATHLEN+1]; + (void) snprintf(buf, MAXPATHLEN, "dither/matrix-%dx%d.xml", x, y); stp_xml_parse_file_named(buf); cachedval = stp_xml_dither_cache_get(x, y); if (cachedval == NULL || cachedval->filename == NULL) |