Difference for common/loader.l from version 1.37 to 1.38


version 1.37 version 1.38
Line 1
 
Line 1
 %{  %{
 /*  /*
  * static char *rcsid_object_c =   * static char *rcsid_object_c =
  *   "$Id: loader.l,v 1.37 2003/02/07 06:57:17 garbled Exp $";   *   "$Id: loader.l,v 1.38 2003/02/12 06:30:25 mwedel Exp $";
  */   */
   
 /*  /*
Line 43
 
Line 43
   
 static int lex_error;  static int lex_error;
 static char msgbuf[HUGE_BUF];  static char msgbuf[HUGE_BUF];
   static char lorebuf[HUGE_BUF];
   
 #define SET_OR_CLEAR_FLAG(op, flag, val) \  #define SET_OR_CLEAR_FLAG(op, flag, val) \
  { if (val) SET_FLAG(op, flag); else CLEAR_FLAG(op, flag); }   { if (val) SET_FLAG(op, flag); else CLEAR_FLAG(op, flag); }
Line 209
 
Line 210
 A .+  A .+
   
 %x MESSAGE  %x MESSAGE
   %x LORE
 %x SCRIPT  %x SCRIPT
   
 /* Don't have to link with -lfl with this */  /* Don't have to link with -lfl with this */
Line 239
 
Line 240
  HUGE_BUF/2, HUGE_BUF, strlen(op->msg),op->msg);   HUGE_BUF/2, HUGE_BUF, strlen(op->msg),op->msg);
      }       }
 <MESSAGE>.*     {strcat(msgbuf, yytext); strcat(msgbuf,"\n"); }  <MESSAGE>.*     {strcat(msgbuf, yytext); strcat(msgbuf,"\n"); }
   
   ^lore{WS}$     { BEGIN( LORE ); lorebuf[0]='\0'; }
   <LORE>^endlore{WS}$ { BEGIN( INITIAL );
    op->lore=add_string(lorebuf);
    /* Just print a warning so we can be reasonably safe
    * about not overflowing the buffer.
    */
    if (strlen(op->lore) > (HUGE_BUF/2))
        LOG(llevDebug, "\n\tWarning lore length > %d (max allowed=%d): %d\n>%.80s<\n",
    HUGE_BUF/2, HUGE_BUF, strlen(op->lore),op->lore);
        }
   <LORE>.*     {strcat(lorebuf, yytext); strcat(lorebuf,"\n"); }
   
 ^object{S}     { char *yv=yval();  ^object{S}     { char *yv=yval();
   
  if (*yv=='\0') {   if (*yv=='\0') {
Line 280
 
Line 294
      if (tmp->arch!=NULL)       if (tmp->arch!=NULL)
  copy_object(&tmp->arch->clone,tmp);   copy_object(&tmp->arch->clone,tmp);
      strcpy(msgbuf, "");       strcpy(msgbuf, "");
        strcpy(lorebuf, "");
      lex_load(tmp, map_flags);       lex_load(tmp, map_flags);
      insert_ob_in_ob(tmp,op);       insert_ob_in_ob(tmp,op);
  }   }
Line 1073
 
Line 1088
     char inbuf[MAX_BUF];      char inbuf[MAX_BUF];
   
     strcpy(msgbuf, "");      strcpy(msgbuf, "");
       strcpy(lorebuf, "");
     if (bufstate==LO_NEWFILE || bufstate==LO_NOREAD) {      if (bufstate==LO_NEWFILE || bufstate==LO_NOREAD) {
 /* LOG(llevDebug,"Switching lex buffers\n");*/  /* LOG(llevDebug,"Switching lex buffers\n");*/
  yy_delete_buffer(YY_CURRENT_BUFFER);   yy_delete_buffer(YY_CURRENT_BUFFER);
Line 1114
 
Line 1130
     int retval;      int retval;
   
     strcpy(msgbuf, "");      strcpy(msgbuf, "");
       strcpy(lorebuf, "");
     yy_push_state(INITIAL);      yy_push_state(INITIAL);
     yybufstate=yy_scan_string(buf);      yybufstate=yy_scan_string(buf);
     retval=lex_load(op,0);      retval=lex_load(op,0);
Line 1219
 
Line 1236
     strcat(buf,op->msg);      strcat(buf,op->msg);
     strcat(buf,"endmsg\n");      strcat(buf,"endmsg\n");
   }    }
     if(op->lore && op->lore!=op2->lore) {
       strcat(buf,"lore\n");
       strcat(buf,op->lore);
       strcat(buf,"endlore\n");
     }
   if(op->other_arch!=op2->other_arch&&op->other_arch!=NULL &&    if(op->other_arch!=op2->other_arch&&op->other_arch!=NULL &&
      op->other_arch->name) {       op->other_arch->name) {
     sprintf(buf2,"other_arch %s\n",op->other_arch->name);      sprintf(buf2,"other_arch %s\n",op->other_arch->name);


Legend:
line(s) removed in v.1.37 
line(s) changed
 line(s) added in v.1.38

File made using version 1.98 of cvs2html by leaf at 2011-07-21 17:12