From: <ny...@us...> - 2006-04-04 06:50:10
|
Revision: 7 Author: nyaochi Date: 2006-04-03 23:49:42 -0700 (Mon, 03 Apr 2006) ViewCVS: http://svn.sourceforge.net/pmplib/?rev=7&view=rev Log Message: ----------- Changed the license description in jspl.c Modified Paths: -------------- trunk/lib/playlist/jspl.c Modified: trunk/lib/playlist/jspl.c =================================================================== --- trunk/lib/playlist/jspl.c 2006-04-04 06:32:21 UTC (rev 6) +++ trunk/lib/playlist/jspl.c 2006-04-04 06:49:42 UTC (rev 7) @@ -3,20 +3,19 @@ * * Copyright (c) 2005-2006 Nyaochi * - * 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 - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License 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., 675 Mass Ave, Cambridge, MA 02139, USA, or visit - * http://www.gnu.org/copyleft/gpl.html . + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ny...@us...> - 2006-07-10 16:51:30
|
Revision: 127 Author: nyaochi Date: 2006-07-10 09:51:26 -0700 (Mon, 10 Jul 2006) ViewCVS: http://svn.sourceforge.net/pmplib/?rev=127&view=rev Log Message: ----------- Check return value from JS_EvaluateUCScript(). Modified Paths: -------------- trunk/lib/playlist/jspl.c Modified: trunk/lib/playlist/jspl.c =================================================================== --- trunk/lib/playlist/jspl.c 2006-07-10 16:14:40 UTC (rev 126) +++ trunk/lib/playlist/jspl.c 2006-07-10 16:51:26 UTC (rev 127) @@ -461,6 +461,9 @@ /* Evaluate the script. */ ret = JS_EvaluateUCScript(jspl->context, jspl->global, script, ucs2len(script), mbsfilename, 1, &retval); + if (!ret) { + return -1; + } ucs2free(script); free(buff); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ny...@us...> - 2006-07-10 19:15:31
|
Revision: 129 Author: nyaochi Date: 2006-07-10 12:15:25 -0700 (Mon, 10 Jul 2006) ViewCVS: http://svn.sourceforge.net/pmplib/?rev=129&view=rev Log Message: ----------- Fix for NULL error messages. Modified Paths: -------------- trunk/lib/playlist/jspl.c Modified: trunk/lib/playlist/jspl.c =================================================================== --- trunk/lib/playlist/jspl.c 2006-07-10 18:32:34 UTC (rev 128) +++ trunk/lib/playlist/jspl.c 2006-07-10 19:15:25 UTC (rev 129) @@ -37,6 +37,7 @@ #include <pmp.h> #include <playlist.h> +#define JS_THREADSAFE #include <jsapi.h> #define MAX_SOURCE_DEPTH 64 @@ -92,15 +93,17 @@ static void error_handler(JSContext *cx, const char *message, JSErrorReport *report) { + ucs2char_t* ucs2 = NULL; jspl_t* jspl = (jspl_t*)JS_GetContextPrivate(cx); - ucs2char_t* ucs2 = NULL; - char *pos = alloca(strlen(report->filename) + 64); /* extra 64 bytes for line numbers. */ + const char *msg = message ? message : "Unknown error"; + const char *filename = report->filename ? report->filename : "(Unknown filename)"; + char *pos = alloca(strlen(filename) + 64); /* extra 64 bytes for line numbers. */ - ucs2 = mbsdupucs2(message); + ucs2 = mbsdupucs2(msg); jspl->callback(jspl->instance, PLCALLBACK_JSPL_ERROR, ucs2); ucs2free(ucs2); - sprintf(pos, "lines %d in %s", report->lineno, report->filename); + sprintf(pos, "lines %d in %s", report->lineno, filename); ucs2 = mbsdupucs2(pos); jspl->callback(jspl->instance, PLCALLBACK_JSPL_ERROR_POS, ucs2); ucs2free(ucs2); @@ -608,10 +611,10 @@ } /* Check if main() function exists. */ - if (!function_exists(jspl, "main")) { + /*if (!function_exists(jspl, "main")) { ret = PLAYLIST_E_JSMAINNOTFOUND; goto error_exit; - } + }*/ /* Call main() function. */ argv[0] = OBJECT_TO_JSVAL(jspl->tracks); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ny...@us...> - 2006-07-10 19:26:37
|
Revision: 130 Author: nyaochi Date: 2006-07-10 12:26:30 -0700 (Mon, 10 Jul 2006) ViewCVS: http://svn.sourceforge.net/pmplib/?rev=130&view=rev Log Message: ----------- Enable LF->CR conversion. EasyPMP still has difficulty in evaluating the script for Playlist object implementation. Modified Paths: -------------- trunk/lib/playlist/jspl.c Modified: trunk/lib/playlist/jspl.c =================================================================== --- trunk/lib/playlist/jspl.c 2006-07-10 19:15:25 UTC (rev 129) +++ trunk/lib/playlist/jspl.c 2006-07-10 19:26:30 UTC (rev 130) @@ -37,7 +37,6 @@ #include <pmp.h> #include <playlist.h> -#define JS_THREADSAFE #include <jsapi.h> #define MAX_SOURCE_DEPTH 64 @@ -441,7 +440,7 @@ jsval retval; /* Open the JavaScript file. */ - fp = ucs2fopen(filename, "rb"); + fp = ucs2fopen(filename, "r"); if (!fp) { return -1; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |