Changeset 7630


Ignore:
Timestamp:
2004-06-22T16:24:30+12:00 (20 years ago)
Author:
kjdon
Message:

fixed up some compiler warnings, and made this header file to be used by the jni class - see comment in jni/MGWrapperImpl.c

Location:
trunk
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl3/packages/mg/src/text/mg_passes_4jni.c

    r7593 r7630  
    2828#endif
    2929
     30#include "mg_passes_4jni.h"
    3031#include "memlib.h"
    3132#include "messages.h"
     
    4142
    4243#include "words.h"
     44#include "environment.h"
    4345
    4446static char *RCSID = "$Id$";
     
    207209
    208210/* -f arg to mg_passes */
    209 void set_filename(char * filen) {
    210   int len = strlen(filen);
     211void set_filename(const char * filen) {
    211212  if (filename) {
    212213    Xfree (filename);
     
    243244/* -M arg to mg_passes */
    244245void set_max_numeric(int max_numeric) {
    245   SetEnv ("maxnumeric", max_numeric, NULL);
     246  char data[99];
     247  sprintf(data, "%d", max_numeric);
     248  SetEnv ("maxnumeric", data, NULL);
    246249}
    247250
    248251/* -a, -s args to mg_passes */
    249 void set_stem_options(char * stemmer, int method) {
     252void set_stem_options(const char * stemmer, int method) {
    250253  stemmer_num = stemmernumber (stemmer);
    251254  stem_method = method & STEMMER_MASK;
     
    258261
    259262/* -n arg to mg_passes */
    260 void set_trace_file(char * filen) {
    261   int len = strlen(filen);
     263void set_trace_file(const char * filen) {
    262264  if (trace_name) {
    263265    Xfree (trace_name);
     
    315317  if (Trace)
    316318    {
    317       int i;
    318319      fprintf (Trace, "\n\n\t\t-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n\n");
    319320      /* print out the args to mg_passes */
     
    356357
    357358
    358 void process_document(u_char *buffer, int len) {
     359void process_document(const u_char *buffer, int len) {
    359360  int pass;
    360361  bytes_processed += len;
  • trunk/gsdl3/src/packages/mg/src/text/mg_passes_4jni.c

    r7593 r7630  
    2828#endif
    2929
     30#include "mg_passes_4jni.h"
    3031#include "memlib.h"
    3132#include "messages.h"
     
    4142
    4243#include "words.h"
     44#include "environment.h"
    4345
    4446static char *RCSID = "$Id$";
     
    207209
    208210/* -f arg to mg_passes */
    209 void set_filename(char * filen) {
    210   int len = strlen(filen);
     211void set_filename(const char * filen) {
    211212  if (filename) {
    212213    Xfree (filename);
     
    243244/* -M arg to mg_passes */
    244245void set_max_numeric(int max_numeric) {
    245   SetEnv ("maxnumeric", max_numeric, NULL);
     246  char data[99];
     247  sprintf(data, "%d", max_numeric);
     248  SetEnv ("maxnumeric", data, NULL);
    246249}
    247250
    248251/* -a, -s args to mg_passes */
    249 void set_stem_options(char * stemmer, int method) {
     252void set_stem_options(const char * stemmer, int method) {
    250253  stemmer_num = stemmernumber (stemmer);
    251254  stem_method = method & STEMMER_MASK;
     
    258261
    259262/* -n arg to mg_passes */
    260 void set_trace_file(char * filen) {
    261   int len = strlen(filen);
     263void set_trace_file(const char * filen) {
    262264  if (trace_name) {
    263265    Xfree (trace_name);
     
    315317  if (Trace)
    316318    {
    317       int i;
    318319      fprintf (Trace, "\n\n\t\t-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n\n");
    319320      /* print out the args to mg_passes */
     
    356357
    357358
    358 void process_document(u_char *buffer, int len) {
     359void process_document(const u_char *buffer, int len) {
    359360  int pass;
    360361  bytes_processed += len;
  • trunk/indexers/mg/src/text/mg_passes_4jni.c

    r7593 r7630  
    2828#endif
    2929
     30#include "mg_passes_4jni.h"
    3031#include "memlib.h"
    3132#include "messages.h"
     
    4142
    4243#include "words.h"
     44#include "environment.h"
    4345
    4446static char *RCSID = "$Id$";
     
    207209
    208210/* -f arg to mg_passes */
    209 void set_filename(char * filen) {
    210   int len = strlen(filen);
     211void set_filename(const char * filen) {
    211212  if (filename) {
    212213    Xfree (filename);
     
    243244/* -M arg to mg_passes */
    244245void set_max_numeric(int max_numeric) {
    245   SetEnv ("maxnumeric", max_numeric, NULL);
     246  char data[99];
     247  sprintf(data, "%d", max_numeric);
     248  SetEnv ("maxnumeric", data, NULL);
    246249}
    247250
    248251/* -a, -s args to mg_passes */
    249 void set_stem_options(char * stemmer, int method) {
     252void set_stem_options(const char * stemmer, int method) {
    250253  stemmer_num = stemmernumber (stemmer);
    251254  stem_method = method & STEMMER_MASK;
     
    258261
    259262/* -n arg to mg_passes */
    260 void set_trace_file(char * filen) {
    261   int len = strlen(filen);
     263void set_trace_file(const char * filen) {
    262264  if (trace_name) {
    263265    Xfree (trace_name);
     
    315317  if (Trace)
    316318    {
    317       int i;
    318319      fprintf (Trace, "\n\n\t\t-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n\n");
    319320      /* print out the args to mg_passes */
     
    356357
    357358
    358 void process_document(u_char *buffer, int len) {
     359void process_document(const u_char *buffer, int len) {
    359360  int pass;
    360361  bytes_processed += len;
Note: See TracChangeset for help on using the changeset viewer.