pier 00/11/26 19:57:59
Modified: service/src/native jsvc.h jsvc_help.c jsvc_parse.c
jsvc_service.c jsvc_unix.c
Log:
Prettier sources, added legal stuff.
Revision Changes Path
1.2 +4 -0 jakarta-tomcat-4.0/service/src/native/jsvc.h
Index: jsvc.h
===================================================================
RCS file: /home/cvs/jakarta-tomcat-4.0/service/src/native/jsvc.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- jsvc.h 2000/11/22 19:26:05 1.1
+++ jsvc.h 2000/11/27 03:57:56 1.2
@@ -54,6 +54,10 @@
* on the Apache Software Foundation, please see <http://www.apache.org/>. *
* *
* ========================================================================= */
+
+// CVS $Id: jsvc.h,v 1.2 2000/11/27 03:57:56 pier Exp $
+// Author: Pier Fumagalli <mailto:[EMAIL PROTECTED]>
+
#ifndef _JSVC_H_
#define _JSVC_H_
1.2 +60 -0 jakarta-tomcat-4.0/service/src/native/jsvc_help.c
Index: jsvc_help.c
===================================================================
RCS file: /home/cvs/jakarta-tomcat-4.0/service/src/native/jsvc_help.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- jsvc_help.c 2000/11/22 19:26:05 1.1
+++ jsvc_help.c 2000/11/27 03:57:56 1.2
@@ -1,3 +1,63 @@
+/* ========================================================================= *
+ * *
+ * The Apache Software License, Version 1.1 *
+ * *
+ * Copyright (c) 1999, 2000 The Apache Software Foundation. *
+ * All rights reserved. *
+ * *
+ * ========================================================================= *
+ * *
+ * Redistribution and use in source and binary forms, with or without modi- *
+ * fication, are permitted provided that the following conditions are met: *
+ * *
+ * 1. Redistributions of source code must retain the above copyright notice *
+ * notice, this list of conditions and the following disclaimer. *
+ * *
+ * 2. Redistributions in binary form must reproduce the above copyright *
+ * notice, this list of conditions and the following disclaimer in the *
+ * documentation and/or other materials provided with the distribution. *
+ * *
+ * 3. The end-user documentation included with the redistribution, if any, *
+ * must include the following acknowlegement: *
+ * *
+ * "This product includes software developed by the Apache Software *
+ * Foundation <http://www.apache.org/>." *
+ * *
+ * Alternately, this acknowlegement may appear in the software itself, if *
+ * and wherever such third-party acknowlegements normally appear. *
+ * *
+ * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software *
+ * Foundation" must not be used to endorse or promote products derived *
+ * from this software without prior written permission. For written *
+ * permission, please contact <[EMAIL PROTECTED]>. *
+ * *
+ * 5. Products derived from this software may not be called "Apache" nor may *
+ * "Apache" appear in their names without prior written permission of the *
+ * Apache Software Foundation. *
+ * *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES *
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY *
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL *
+ * THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY *
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL *
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS *
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) *
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, *
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN *
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE *
+ * POSSIBILITY OF SUCH DAMAGE. *
+ * *
+ * ========================================================================= *
+ * *
+ * This software consists of voluntary contributions made by many indivi- *
+ * duals on behalf of the Apache Software Foundation. For more information *
+ * on the Apache Software Foundation, please see <http://www.apache.org/>. *
+ * *
+ * ========================================================================= */
+
+// CVS $Id: jsvc_help.c,v 1.2 2000/11/27 03:57:56 pier Exp $
+// Author: Pier Fumagalli <mailto:[EMAIL PROTECTED]>
+
#include <jsvc.h>
int jsvc_help(jsvc_config *config) {
1.2 +64 -4 jakarta-tomcat-4.0/service/src/native/jsvc_parse.c
Index: jsvc_parse.c
===================================================================
RCS file: /home/cvs/jakarta-tomcat-4.0/service/src/native/jsvc_parse.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- jsvc_parse.c 2000/11/22 19:26:05 1.1
+++ jsvc_parse.c 2000/11/27 03:57:56 1.2
@@ -1,3 +1,63 @@
+/* ========================================================================= *
+ * *
+ * The Apache Software License, Version 1.1 *
+ * *
+ * Copyright (c) 1999, 2000 The Apache Software Foundation. *
+ * All rights reserved. *
+ * *
+ * ========================================================================= *
+ * *
+ * Redistribution and use in source and binary forms, with or without modi- *
+ * fication, are permitted provided that the following conditions are met: *
+ * *
+ * 1. Redistributions of source code must retain the above copyright notice *
+ * notice, this list of conditions and the following disclaimer. *
+ * *
+ * 2. Redistributions in binary form must reproduce the above copyright *
+ * notice, this list of conditions and the following disclaimer in the *
+ * documentation and/or other materials provided with the distribution. *
+ * *
+ * 3. The end-user documentation included with the redistribution, if any, *
+ * must include the following acknowlegement: *
+ * *
+ * "This product includes software developed by the Apache Software *
+ * Foundation <http://www.apache.org/>." *
+ * *
+ * Alternately, this acknowlegement may appear in the software itself, if *
+ * and wherever such third-party acknowlegements normally appear. *
+ * *
+ * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software *
+ * Foundation" must not be used to endorse or promote products derived *
+ * from this software without prior written permission. For written *
+ * permission, please contact <[EMAIL PROTECTED]>. *
+ * *
+ * 5. Products derived from this software may not be called "Apache" nor may *
+ * "Apache" appear in their names without prior written permission of the *
+ * Apache Software Foundation. *
+ * *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES *
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY *
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL *
+ * THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY *
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL *
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS *
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) *
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, *
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN *
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE *
+ * POSSIBILITY OF SUCH DAMAGE. *
+ * *
+ * ========================================================================= *
+ * *
+ * This software consists of voluntary contributions made by many indivi- *
+ * duals on behalf of the Apache Software Foundation. For more information *
+ * on the Apache Software Foundation, please see <http://www.apache.org/>. *
+ * *
+ * ========================================================================= */
+
+// CVS $Id: jsvc_parse.c,v 1.2 2000/11/27 03:57:56 pier Exp $
+// Author: Pier Fumagalli <mailto:[EMAIL PROTECTED]>
+
#include <jsvc.h>
// Temporary variable used to process the classpath entry
@@ -13,19 +73,19 @@
jsvc_error(JSVC_MARK, "Binary filename unspecified");
return(NULL);
} else config->binary=strdup(b);
-
+
if (r==NULL) {
jsvc_error(JSVC_MARK, "Default configuration filename unspecified");
return(NULL);
} else config->root=strdup(r);
-
+
if (h==NULL) {
jsvc_error(JSVC_MARK, "Virtual machine home path unspecified");
return(NULL);
} else config->home=strdup(h);
-
+
config->vm=NULL;
-
+
sprintf(buffer, "%s/%s.conf", config->root, config->binary);
config->parfile=strdup(buffer);
#ifndef WIN32
1.2 +61 -1 jakarta-tomcat-4.0/service/src/native/jsvc_service.c
Index: jsvc_service.c
===================================================================
RCS file: /home/cvs/jakarta-tomcat-4.0/service/src/native/jsvc_service.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- jsvc_service.c 2000/11/22 19:26:05 1.1
+++ jsvc_service.c 2000/11/27 03:57:57 1.2
@@ -1,3 +1,63 @@
+/* ========================================================================= *
+ * *
+ * The Apache Software License, Version 1.1 *
+ * *
+ * Copyright (c) 1999, 2000 The Apache Software Foundation. *
+ * All rights reserved. *
+ * *
+ * ========================================================================= *
+ * *
+ * Redistribution and use in source and binary forms, with or without modi- *
+ * fication, are permitted provided that the following conditions are met: *
+ * *
+ * 1. Redistributions of source code must retain the above copyright notice *
+ * notice, this list of conditions and the following disclaimer. *
+ * *
+ * 2. Redistributions in binary form must reproduce the above copyright *
+ * notice, this list of conditions and the following disclaimer in the *
+ * documentation and/or other materials provided with the distribution. *
+ * *
+ * 3. The end-user documentation included with the redistribution, if any, *
+ * must include the following acknowlegement: *
+ * *
+ * "This product includes software developed by the Apache Software *
+ * Foundation <http://www.apache.org/>." *
+ * *
+ * Alternately, this acknowlegement may appear in the software itself, if *
+ * and wherever such third-party acknowlegements normally appear. *
+ * *
+ * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software *
+ * Foundation" must not be used to endorse or promote products derived *
+ * from this software without prior written permission. For written *
+ * permission, please contact <[EMAIL PROTECTED]>. *
+ * *
+ * 5. Products derived from this software may not be called "Apache" nor may *
+ * "Apache" appear in their names without prior written permission of the *
+ * Apache Software Foundation. *
+ * *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES *
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY *
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL *
+ * THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY *
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL *
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS *
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) *
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, *
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN *
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE *
+ * POSSIBILITY OF SUCH DAMAGE. *
+ * *
+ * ========================================================================= *
+ * *
+ * This software consists of voluntary contributions made by many indivi- *
+ * duals on behalf of the Apache Software Foundation. For more information *
+ * on the Apache Software Foundation, please see <http://www.apache.org/>. *
+ * *
+ * ========================================================================= */
+
+// CVS $Id: jsvc_service.c,v 1.2 2000/11/27 03:57:57 pier Exp $
+// Author: Pier Fumagalli <mailto:[EMAIL PROTECTED]>
+
#include <jsvc.h>
void jsvc_log(JNIEnv *env, jobject obj, jstring msg) {
@@ -92,7 +152,7 @@
// Prepare a string containing the class name of the service
name=(*cfg->jnienv)->NewStringUTF(cfg->jnienv, cfg->class);
-
+
// Prepare an array of strings with the command line options
arg=(*cfg->jnienv)->NewObjectArray(cfg->jnienv, cfg->clargc,
(*cfg->jnienv)->FindClass(cfg->jnienv, "java/lang/String"),NULL);
1.2 +62 -2 jakarta-tomcat-4.0/service/src/native/jsvc_unix.c
Index: jsvc_unix.c
===================================================================
RCS file: /home/cvs/jakarta-tomcat-4.0/service/src/native/jsvc_unix.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- jsvc_unix.c 2000/11/22 19:26:05 1.1
+++ jsvc_unix.c 2000/11/27 03:57:57 1.2
@@ -1,3 +1,63 @@
+/* ========================================================================= *
+ * *
+ * The Apache Software License, Version 1.1 *
+ * *
+ * Copyright (c) 1999, 2000 The Apache Software Foundation. *
+ * All rights reserved. *
+ * *
+ * ========================================================================= *
+ * *
+ * Redistribution and use in source and binary forms, with or without modi- *
+ * fication, are permitted provided that the following conditions are met: *
+ * *
+ * 1. Redistributions of source code must retain the above copyright notice *
+ * notice, this list of conditions and the following disclaimer. *
+ * *
+ * 2. Redistributions in binary form must reproduce the above copyright *
+ * notice, this list of conditions and the following disclaimer in the *
+ * documentation and/or other materials provided with the distribution. *
+ * *
+ * 3. The end-user documentation included with the redistribution, if any, *
+ * must include the following acknowlegement: *
+ * *
+ * "This product includes software developed by the Apache Software *
+ * Foundation <http://www.apache.org/>." *
+ * *
+ * Alternately, this acknowlegement may appear in the software itself, if *
+ * and wherever such third-party acknowlegements normally appear. *
+ * *
+ * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software *
+ * Foundation" must not be used to endorse or promote products derived *
+ * from this software without prior written permission. For written *
+ * permission, please contact <[EMAIL PROTECTED]>. *
+ * *
+ * 5. Products derived from this software may not be called "Apache" nor may *
+ * "Apache" appear in their names without prior written permission of the *
+ * Apache Software Foundation. *
+ * *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES *
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY *
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL *
+ * THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY *
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL *
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS *
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) *
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, *
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN *
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE *
+ * POSSIBILITY OF SUCH DAMAGE. *
+ * *
+ * ========================================================================= *
+ * *
+ * This software consists of voluntary contributions made by many indivi- *
+ * duals on behalf of the Apache Software Foundation. For more information *
+ * on the Apache Software Foundation, please see <http://www.apache.org/>. *
+ * *
+ * ========================================================================= */
+
+// CVS $Id: jsvc_unix.c,v 1.2 2000/11/27 03:57:57 pier Exp $
+// Author: Pier Fumagalli <mailto:[EMAIL PROTECTED]>
+
#include <jsvc.h>
int main(int argc, char *argv[]) {
@@ -68,9 +128,9 @@
if (!jsvc_createvm(config)) return(1);
if (!jsvc_prepare(config)) return(1);
-
+
if (!jsvc_version(config)) return(1);
-
+
if (!jsvc_init(config)) return(1);
if (!jsvc_start(config)) return(1);