Patching Oasis OLC to CVS062116 with 128bits (crossposted-newbie)

From: Mathew Earle Reuther (graymere@zipcon.net)
Date: 06/24/02


Below is an excerpt from my db.c (around lines 1465 to 1517) . . . I am
trying to get Oasis OLC patched into the current CVS snapshot +128bit
patch.

  /* *** numeric data *** */
  if (!get_line(obj_f, line)) {
    log("SYSERR: Expecting first numeric line of %s, but file ended!",
buf2);
    exit(1);
  }
  if ((retval = sscanf(line, " %d %s %s %s %s %s %s %s %s %d", t, f1, f2,
f3, f4, f5, f6, f7, f8, t)) != 10) {
    log("SYSERR: Format error in first numeric line (expecting 10 args,
got %d), %s", retval, buf2);
    exit(1);
  }

  /* Object flags checked in check_object(). */
  GET_OBJ_TYPE(obj_proto + i) = t[0];
  GET_OBJ_EXTRA(obj_proto + i)[0] = asciiflag_conv(f1);
  GET_OBJ_EXTRA(obj_proto + i)[1] = asciiflag_conv(f2);
  GET_OBJ_EXTRA(obj_proto + i)[2] = asciiflag_conv(f3);
  GET_OBJ_EXTRA(obj_proto + i)[3] = asciiflag_conv(f4);
  GET_OBJ_WEAR(obj_proto + i)[0] = asciiflag_conv(f5);
  GET_OBJ_WEAR(obj_proto + i)[1] = asciiflag_conv(f6);
  GET_OBJ_WEAR(obj_proto + i)[2] = asciiflag_conv(f7);
  GET_OBJ_WEAR(obj_proto + i)[3] = asciiflag_conv(f8);
  GET_OBJ_PERM(obj_proto + i) = t[9];

  if (!get_line(obj_f, line)) {
    log("SYSERR: Expecting second numeric line of %s, but file ended!",
buf2);
    exit(1);
  }
  if ((retval = sscanf(line, "%d %d %d %d", t, t + 1, t + 2, t + 3)) != 4)
{
    log("SYSERR: Format error in second numeric line (expecting 4 args,
got %d), %s", retval, buf2);
    exit(1);
  }
  GET_OBJ_VAL(obj_proto + i, 0) = t[0];
  GET_OBJ_VAL(obj_proto + i, 1) = t[1];
  GET_OBJ_VAL(obj_proto + i, 2) = t[2];
  GET_OBJ_VAL(obj_proto + i, 3) = t[3];

  if (!get_line(obj_f, line)) {
    log("SYSERR: Expecting third numeric line of %s, but file ended!",
buf2);
    exit(1);
  }
  if ((retval = sscanf(line, "%d %d %d %d", t, t + 1, t + 2, t + 3)) != 4)
{
    if (retval == 3)
      t[3] = 0;
    else {
      log("SYSERR: Format error in third numeric line (expecting 4 args,
got %d), %s", retval, buf2);
    exit(1);
  }
  }
  GET_OBJ_WEIGHT(obj_proto + i) = t[0];
  GET_OBJ_COST(obj_proto + i) = t[1];
  GET_OBJ_RENT(obj_proto + i) = t[2];
  GET_OBJ_LEVEL(obj_proto + i) = t[3];

  /* check to make sure that weight of containers exceeds curr. quantity
*/


In particular this section is cauing me an issue.  Here is what I
CURRENTLY have in my file (repeat of above):

  if ((retval = sscanf(line, "%d %d %d %d", t, t + 1, t + 2, t + 3)) != 4)
{
    if (retval == 3)
      t[3] = 0;
    else {
      log("SYSERR: Format error in third numeric line (expecting 4 args,
got %d), %s", retval, buf2);
    exit(1);
  }

and this is what my db.c.rej contains:

+   if ((retval = sscanf(line, " %d %s %s %d", t, f1, f2, t + 3)) != 4) {
+     if (retval == 3)
+       t[3] = 0;
+     else {
+       log("SYSERR: Format error in first numeric line (expecting 4 args,
got %d), %s", retval, buf2);
      exit(1);
    }

My question, I suppose, is what the heck should the combined db.c actually
look like?  I've made some changes by hand to the db.c code following what
seems to be a logical method of combining the db.c and db.c.rej . . . but
this is not something I'm particularly adept with.  (I'm used to ROM
codebase, and adding an affected2 field is much easier there.  However
after looking at the Circle codebase, I found it to be very nice indeed,
and have decided to develop under it now.)

Hopefully someone can render some assistance?

-Mathew


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Free $5 Love Reading
Risk Free!
http://us.click.yahoo.com/3PCXaC/PfREAA/Ey.GAA/9kRolB/TM
---------------------------------------------------------------------~->



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 06/25/03 PDT