View | Details | Raw Unified
Collapse All | Expand All

(-) ns-allinone-2.27.orig/nam-1.10/agent.h (-1 / +1 lines)
 Lines 70-76    Link Here 
  inline double width()  {return width_;}
  inline double width()  {return width_;}
  inline double height() {return height_;}
  inline double height() {return height_;}
  virtual void findClosestCornertoPoint(double x, double y, 
  virtual void findClosestCornertoPoint(double x, double y, 
               double &corner_x, double &corner_y) const = NULL; 
               double &corner_x, double &corner_y) const = 0; 
  virtual void place(double x, double y);
  virtual void place(double x, double y);
  void label(const char* name, int anchor);
  void label(const char* name, int anchor);
  void color(const char* name);
  void color(const char* name);
(-) ns-allinone-2.27.orig/ns-2.27/diffusion/diff_rate.cc (-2 / +2 lines)
 Lines 370-376    Link Here 
       INTF_INSERT(routing_table[dtype].active, OutPtr);
       INTF_INSERT(routing_table[dtype].active, OutPtr);
       routing_table[dtype].num_active ++;	  
       routing_table[dtype].num_active ++;	  
     } else {
     } else {
      GRAD_TMOUT(RetVal.cur) = max(GRAD_TMOUT(RetVal.cur),
      GRAD_TMOUT(RetVal.cur) = MAX(GRAD_TMOUT(RetVal.cur),
				   dfh->ts_ + INTEREST_TIMEOUT);
				   dfh->ts_ + INTEREST_TIMEOUT);
     }
     }
 Lines 789-795    Link Here 
  if (RetVal.cur != NULL) {
  if (RetVal.cur != NULL) {
    cur_out = (Out_List *)(RetVal.cur);
    cur_out = (Out_List *)(RetVal.cur);
    GRADIENT(cur_out) = ORIGINAL;
    GRADIENT(cur_out) = ORIGINAL;
    GRAD_TMOUT(RetVal.cur) = max(GRAD_TMOUT(RetVal.cur),
    GRAD_TMOUT(RetVal.cur) = MAX(GRAD_TMOUT(RetVal.cur),
				   dfh->ts_ + INTEREST_TIMEOUT);
				   dfh->ts_ + INTEREST_TIMEOUT);
    NUM_POS_RECV(cur_out)++;
    NUM_POS_RECV(cur_out)++;
  } else {
  } else {
(-) ns-allinone-2.27.orig/ns-2.27/diffusion/diffusion.h (-1 / +1 lines)
 Lines 75-81    Link Here 
#define SEND_MESSAGE(x,y,z)  send_to_dmux(prepare_message(x,y,z), 0)
#define SEND_MESSAGE(x,y,z)  send_to_dmux(prepare_message(x,y,z), 0)
#define max(a,b) (((a)<(b))?(b):(a))
#define MAX(a,b) (((a)<(b))?(b):(a))
class DiffusionAgent;
class DiffusionAgent;
(-) ns-allinone-2.27.orig/ns-2.27/diffusion/routing_table.cc (-1 / +1 lines)
 Lines 129-135    Link Here 
  int     most = 0;
  int     most = 0;
  for (cur=iif; cur!=NULL; cur = IN_NEXT(cur)) {
  for (cur=iif; cur!=NULL; cur = IN_NEXT(cur)) {
      most = max(most,NEW_ORG_RECV(cur));
      most = MAX(most,NEW_ORG_RECV(cur));
  }
  }
  return most;
  return most;
}
}
(-) ns-allinone-2.27.orig/ns-2.27/diffusion3/lib/nr/nr.hh (-1 / +4 lines)
 Lines 43-49    Link Here 
typedef signed int int32_t;
typedef signed int int32_t;
#endif
#endif
typedef signed short int16_t;
typedef signed short int16_t;
#if defined (sparc)
// #if defined (sparc)
#if defined (__SVR4) && defined (__sun)
typedef char int8_t;
typedef char int8_t;
#else
#else
// Conflicts with system declaration of int8_t in Solaris
// Conflicts with system declaration of int8_t in Solaris
 Lines 221-226    Link Here 
};
};
// string specialization
// string specialization
template <>
class NRSimpleAttribute<char *>: public NRAttribute {
class NRSimpleAttribute<char *>: public NRAttribute {
public:
public:
  NRSimpleAttribute(int key, int type, int op, char *val, int size = 0);
  NRSimpleAttribute(int key, int type, int op, char *val, int size = 0);
 Lines 236-241    Link Here 
};
};
// blob specialization
// blob specialization
template <>
class NRSimpleAttribute<void *>: public NRAttribute {
class NRSimpleAttribute<void *>: public NRAttribute {
public:
public:
  NRSimpleAttribute(int key, int type, int op, void *val, int size);
  NRSimpleAttribute(int key, int type, int op, void *val, int size);
(-) ns-allinone-2.27.orig/ns-2.27/indep-utils/cmu-scen-gen/setdest/Makefile.in (-1 / +1 lines)
 Lines 37-43    Link Here 
MKDEP	= ../../../conf/mkdep
MKDEP	= ../../../conf/mkdep
# when including files from ns, we need to take care STL_NAMESPACE
# when including files from ns, we need to take care STL_NAMESPACE
DEFINE = -Dstand_alone -DSTL_NAMESPACE=@STL_NAMESPACE@
DEFINE = -Dstand_alone -DSTL_NAMESPACE=@STL_NAMESPACE@ -DCPP_NAMESPACE=@CPP_NAMESPACE@
CFLAGS = @V_CCOPT@ 
CFLAGS = @V_CCOPT@ 
LDFLAGS = @V_STATIC@
LDFLAGS = @V_STATIC@
LIBS = @V_LIB@ -lm @LIBS@
LIBS = @V_LIB@ -lm @LIBS@
(-) ns-allinone-2.27.orig/ns-2.27/indep-utils/webtrace-conv/dec/Makefile.in (-1 / +1 lines)
 Lines 38-44    Link Here 
# when including files from ns, we need to take care STL_NAMESPACE
# when including files from ns, we need to take care STL_NAMESPACE
CC = @CXX@
CC = @CXX@
INCLUDE = -I. @V_INCLUDES@
INCLUDE = -I. @V_INCLUDES@
CFLAGS = @V_CCOPT@ -DSTL_NAMESPACE=@STL_NAMESPACE@
CFLAGS = @V_CCOPT@ -DSTL_NAMESPACE=@STL_NAMESPACE@ -DCPP_NAMESPACE=@CPP_NAMESPACE@
LDFLAGS = @V_STATIC@
LDFLAGS = @V_STATIC@
LIBS = @V_LIB_TCL@ @V_LIB@ @LIBS@
LIBS = @V_LIB_TCL@ @V_LIB@ @LIBS@
INSTALL = @INSTALL@
INSTALL = @INSTALL@
(-) ns-allinone-2.27.orig/ns-2.27/indep-utils/webtrace-conv/nlanr/Makefile.in (-1 / +1 lines)
 Lines 35-41    Link Here 
# when including files from ns, we need to take care STL_NAMESPACE
# when including files from ns, we need to take care STL_NAMESPACE
CC = @CXX@
CC = @CXX@
INCLUDE = -I. -I../../.. @V_INCLUDES@
INCLUDE = -I. -I../../.. @V_INCLUDES@
CFLAGS = @V_CCOPT@ -DSTL_NAMESPACE=@STL_NAMESPACE@
CFLAGS = @V_CCOPT@ -DSTL_NAMESPACE=@STL_NAMESPACE@ -DCPP_NAMESPACE=@CPP_NAMESPACE@
LDFLAGS = @V_STATIC@
LDFLAGS = @V_STATIC@
LIBS = @V_LIB_TCL@ @V_LIB@ @LIBS@
LIBS = @V_LIB_TCL@ @V_LIB@ @LIBS@
INSTALL = @INSTALL@
INSTALL = @INSTALL@
(-) ns-allinone-2.27.orig/ns-2.27/linkstate/ls.h (-2 / +2 lines)
 Lines 86-92    Link Here 
	LsList() : baseList() {}
	LsList() : baseList() {}
	LsList(const _Tp& x) : baseList(1, x) {}
	LsList(const _Tp& x) : baseList(1, x) {}
	void eraseAll() { 
	void eraseAll() { 
		baseList::erase(begin(), end()); 
		baseList::erase(baseList::begin(), baseList::end()); 
	}
	}
	LsList<_Tp>& operator= (const LsList<_Tp> & x) {
	LsList<_Tp>& operator= (const LsList<_Tp> & x) {
		return (LsList<_Tp> &)baseList::operator= (x);
		return (LsList<_Tp> &)baseList::operator= (x);
 Lines 109-115    Link Here 
		return ib.second ? ib.first : baseMap::end();
		return ib.second ? ib.first : baseMap::end();
	}
	}
	void eraseAll() { erase(begin(), end()); }
	void eraseAll() { erase(baseMap::begin(), baseMap::end()); }
	T* findPtr(Key key) {
	T* findPtr(Key key) {
		iterator it = baseMap::find(key);
		iterator it = baseMap::find(key);
		return (it == baseMap::end()) ? (T *)NULL : &((*it).second);
		return (it == baseMap::end()) ? (T *)NULL : &((*it).second);
(-) ns-allinone-2.27.orig/ns-2.27/mac/wireless-phy.cc (-8 / +8 lines)
 Lines 55-61    Link Here 
#include "diffusion/diff_header.h"
#include "diffusion/diff_header.h"
#define max(a,b) (((a)<(b))?(b):(a))
#define MAX(a,b) (((a)<(b))?(b):(a))
void Idle_Timer::expire(Event *) {
void Idle_Timer::expire(Event *) {
	a_->UpdateIdleEnergy();
	a_->UpdateIdleEnergy();
 Lines 200-207    Link Here 
		if (em()->energy() > 0) {
		if (em()->energy() > 0) {
			//double txtime = (8.*hdr_cmn::access(p)->size())/bandwidth_;
			//double txtime = (8.*hdr_cmn::access(p)->size())/bandwidth_;
		    double txtime = hdr_cmn::access(p)->txtime();
		    double txtime = hdr_cmn::access(p)->txtime();
		    double start_time = max(channel_idle_time_, NOW);
		    double start_time = MAX(channel_idle_time_, NOW);
		    double end_time = max(channel_idle_time_, NOW+txtime);
		    double end_time = MAX(channel_idle_time_, NOW+txtime);
		    double actual_txtime = end_time-start_time;
		    double actual_txtime = end_time-start_time;
		    if (start_time > update_energy_time_) {
		    if (start_time > update_energy_time_) {
 Lines 220-226    Link Here 
		    */
		    */
		   // Sanity check
		   // Sanity check
		   double temp = max(NOW,last_send_time_);
		   double temp = MAX(NOW,last_send_time_);
		   /*
		   /*
		   if (NOW < last_send_time_) {
		   if (NOW < last_send_time_) {
 Lines 228-235    Link Here 
		   }
		   }
		   */
		   */
		   
		   
		   double begin_adjust_time = min(channel_idle_time_, temp);
		   double begin_adjust_time = MIN(channel_idle_time_, temp);
		   double finish_adjust_time = min(channel_idle_time_, NOW+txtime);
		   double finish_adjust_time = MIN(channel_idle_time_, NOW+txtime);
		   double gap_adjust_time = finish_adjust_time - begin_adjust_time;
		   double gap_adjust_time = finish_adjust_time - begin_adjust_time;
		   if (gap_adjust_time < 0.0) {
		   if (gap_adjust_time < 0.0) {
			   fprintf(stderr,"What the heck ! negative gap time.\n");
			   fprintf(stderr,"What the heck ! negative gap time.\n");
 Lines 354-361    Link Here 
		  em()->DecrRcvEnergy(rcvtime,Pr_consume_);
		  em()->DecrRcvEnergy(rcvtime,Pr_consume_);
		*/
		*/
		double start_time = max(channel_idle_time_, NOW);
		double start_time = MAX(channel_idle_time_, NOW);
		double end_time = max(channel_idle_time_, NOW+rcvtime);
		double end_time = MAX(channel_idle_time_, NOW+rcvtime);
		double actual_rcvtime = end_time-start_time;
		double actual_rcvtime = end_time-start_time;
		if (start_time > update_energy_time_) {
		if (start_time > update_energy_time_) {
(-) ns-allinone-2.27.orig/ns-2.27/mobile/god.cc (-1 / +1 lines)
 Lines 645-651    Link Here 
  for(i = 0; i < num_nodes; i++) {
  for(i = 0; i < num_nodes; i++) {
     for(j = 0; j < num_nodes; j++) {
     for(j = 0; j < num_nodes; j++) {
	 for(k = 0; k < num_nodes; k++) {
	 for(k = 0; k < num_nodes; k++) {
	    MIN_HOPS(j,k) = min(MIN_HOPS(j,k), MIN_HOPS(j,i) + MIN_HOPS(i,k));
	    MIN_HOPS(j,k) = MIN(MIN_HOPS(j,k), MIN_HOPS(j,i) + MIN_HOPS(i,k));
	 }
	 }
     }
     }
  }
  }
(-) ns-allinone-2.27.orig/ns-2.27/mobile/gridkeeper.cc (-6 / +6 lines)
 Lines 133-139    Link Here 
  endy = mn->destY();
  endy = mn->destY();
  if (vx > 0) {
  if (vx > 0) {
    endi = min(dim_x_-1, (int)endx);
    endi = MIN(dim_x_-1, (int)endx);
    for (i = (int)x+1; i <= endi; i++) {
    for (i = (int)x+1; i <= endi; i++) {
      tm = (i-x)/vx;
      tm = (i-x)/vx;
      pother = vy*tm + y;
      pother = vy*tm + y;
 Lines 182-188    Link Here 
    }
    }
  }
  }
  if (vy > 0) {
  if (vy > 0) {
    endi = min(dim_y_-1, (int)endy);
    endi = MIN(dim_y_-1, (int)endy);
    for (j = (int)y+1; j <= endi; j++) {
    for (j = (int)y+1; j <= endi; j++) {
      tm = (j-y)/vy;
      tm = (j-y)/vy;
      pother = vx*tm + x;
      pother = vx*tm + x;
 Lines 237-247    Link Here 
  adj = (int)ceil(mnr);
  adj = (int)ceil(mnr);
  ulx = min(dim_x_-1, grid_x + adj);
  ulx = MIN(dim_x_-1, grid_x + adj);
  uly = min(dim_y_-1, grid_y + adj);
  uly = MIN(dim_y_-1, grid_y + adj);
  lly = max(0, grid_y - adj);
  lly = MAX(0, grid_y - adj);
  for (i = max(0, grid_x - adj); i <= ulx; i++) {
  for (i = MAX(0, grid_x - adj); i <= ulx; i++) {
    for (j = lly; j <= uly; j++) {
    for (j = lly; j <= uly; j++) {
      for (pgd = grid_[i][j]; pgd != 0; pgd = pgd->next()) {
      for (pgd = grid_[i][j]; pgd != 0; pgd = pgd->next()) {
	if (mn->address() == pgd->address()) 
	if (mn->address() == pgd->address()) 
(-) ns-allinone-2.27.orig/ns-2.27/mobile/gridkeeper.h (-2 / +2 lines)
 Lines 13-20    Link Here 
#include "mobilenode.h"
#include "mobilenode.h"
#define min(a,b) (((a)>(b))?(b):(a))
#define MIN(a,b) (((a)>(b))?(b):(a))
#define max(a,b) (((a)<(b))?(b):(a))
#define MAX(a,b) (((a)<(b))?(b):(a))
#define aligngrid(a,b) (((a)==(b))?((b)-1):((a)))
#define aligngrid(a,b) (((a)==(b))?((b)-1):((a)))
(-) ns-allinone-2.27.orig/ns-2.27/sctp/sctp.cc (-1 / +1 lines)
 Lines 151-157    Link Here 
      Packet::free(spDest->opRoutingAssistPacket);
      Packet::free(spDest->opRoutingAssistPacket);
      spDest->opRoutingAssistPacket = NULL;
      spDest->opRoutingAssistPacket = NULL;
      delete (SctpDest_S *) spCurrNode->vpData;  //spDest
      delete (SctpDest_S *) spCurrNode->vpData;  //spDest
      (SctpDest_S *) spCurrNode->vpData = NULL;
      spCurrNode->vpData = NULL;
    }
    }
  if(spSctpTrace != NULL)
  if(spSctpTrace != NULL)
(-) ns-allinone-2.27.orig/ns-2.27/webcache/webtraf.cc (-2 / +5 lines)
 Lines 412-419    Link Here 
			nServer_ = atoi(argv[2]);
			nServer_ = atoi(argv[2]);
			if (server_ != NULL) 
			if (server_ != NULL) 
				delete []server_;
				delete []server_;
			server_ = new WebServer[nServer_](this);
			server_ = (WebServer*) malloc(nServer_ * sizeof(WebServer));
			WebServer tmp(this);
			for (int i = 0; i < nServer_; i++) {
				memcpy(&server_[i], &tmp, sizeof(WebServer));
			}
			return (TCL_OK);
			return (TCL_OK);
		} else if (strcmp(argv[1], "set-num-client") == 0) {
		} else if (strcmp(argv[1], "set-num-client") == 0) {
			nClient_ = atoi(argv[2]);
			nClient_ = atoi(argv[2]);
(-) ns-allinone-2.27.orig/tclcl-1.15/tclcl.h (-1 / +3 lines)
 Lines 45-51    Link Here 
}
}
#include "tclcl-config.h"
#include "tclcl-config.h"
#include "tclcl-mappings.h"
// #include "tclcl-mappings.h"
#include "tracedvar.h"
#include "tracedvar.h"
struct Tk_Window_;
struct Tk_Window_;
 Lines 158-163    Link Here 
	Tcl_HashTable objs_;
	Tcl_HashTable objs_;
};
};
#include "tclcl-mappings.h"
class InstVar;
class InstVar;
class TclObject {
class TclObject {