Main Page | Namespace List | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

manifest.c File Reference


Detailed Description

Read JAR manifest file.

Control

$URL: https://svn.apache.org/path/name/manifest.c $ $Id: manifest.c 0 09/28/2005 dlydick $

Copyright 2005 The Apache Software Foundation or its licensors, as applicable.

Licensed under the Apache License, Version 2.0 ("the License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

See the License for the specific language governing permissions and limitations under the License.

Version:
$LastChangedRevision: 0 $
Date:
$LastChangedDate: 09/28/2005 $
Author:
$LastChangedBy: dlydick $ Original code contributed by Daniel Lydick on 09/28/2005.

Reference

Definition in file manifest.c.

#include "arch.h"
#include <stdio.h>
#include <ctype.h>
#include <strings.h>
#include "jvmcfg.h"
#include "heap.h"
#include "exit.h"
#include "util.h"

Go to the source code of this file.

Functions

static void manifest_c_dummy (void)
rcharmanifest_get_main (rchar *mnfname)
 Search a JAR manifest file for a main class attribute.

Variables

static char * manifest_c_copyright = "\0" "$URL: https://svn.apache.org/path/name/manifest.c $ $Id: manifest.c 0 09/28/2005 dlydick $" " " "Copyright 2005 The Apache Software Foundation or its licensors, as applicable."


Function Documentation

static void manifest_c_dummy void   )  [static]
 

Definition at line 40 of file manifest.c.

rchar* manifest_get_main rchar mnfname  ) 
 

Search a JAR manifest file for a main class attribute.

This attribute MUST be all on one line and without any line continuations breaking up the class name. Look for a line of text like this, where | indicates that the following character is the first one on the line:

      |
      |Main-Class: name.of.start.class\n
      |
  
   WITHOUT any line continuations,
  
      |
      |Main-Class: name.of.sta\n
      | rt.class\n
      |
  
   

Todo:
Although such a continuation is supported by the JAR file, this implementation does not support it (yet). With this restriction, the if only one single space separates the name of the attribute and the class name, then since a line may be up to 72 characters long (that is JVMCFG_JARFILE_MANIFEST_LINE_MAX characters), then the class name may be 61 characters long.
Parameters:
mnfname JAR manifest file name, /absolute/path/name
Returns:
Heap pointer to null-terminated class name, or rnull if not found. Call HEAP_FREE_DATA() when done.
< Convenient size for any stdio msg

< Convenient size for any stdio msg

Definition at line 90 of file manifest.c.

References exit_jvm(), EXIT_MANIFEST_JAR, HEAP_FREE_DATA, HEAP_GET_DATA, JVMCFG_JARFILE_MANIFEST_MAIN_CLASS, JVMCFG_STDIO_BFR, rfalse, rnull, and sysErrMsg().


Variable Documentation

char* manifest_c_copyright = "\0" "$URL: https://svn.apache.org/path/name/manifest.c $ $Id: manifest.c 0 09/28/2005 dlydick $" " " "Copyright 2005 The Apache Software Foundation or its licensors, as applicable." [static]
 

Definition at line 40 of file manifest.c.


Generated on Fri Sep 30 18:50:08 2005 by  doxygen 1.4.4