e576bb2002-10-11Martin Nilsson /* || This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information. */
24ddc71998-03-28Henrik Grubbström (Grubba) 
5267b71995-08-09Fredrik Hübinette (Hubbe) #ifndef OPERATORS_H #define OPERATORS_H
6f0d752000-12-16Marcus Comstedt #define COMPARISON(ID,NAME,X) PMOD_EXPORT void ID(INT32 num_arg);
5267b71995-08-09Fredrik Hübinette (Hubbe) 
d6f2c11999-03-03Fredrik Hübinette (Hubbe) #include "svalue.h"
19aaeb1998-05-25Fredrik Hübinette (Hubbe) extern struct program *string_assignment_program; struct string_assignment_storage { struct svalue lval[2]; struct pike_string *s; };
408a1e2004-10-30Martin Stjernholm /* Flags for the bitfield to o_range2. */ #define RANGE_LOW_FROM_BEG 0x10 #define RANGE_LOW_FROM_END 0x20 #define RANGE_LOW_OPEN 0x40 #define RANGE_HIGH_FROM_BEG 0x01 #define RANGE_HIGH_FROM_END 0x02 #define RANGE_HIGH_OPEN 0x04 /* The bound type flags passed to `[..] */ #define INDEX_FROM_BEG 0 #define INDEX_FROM_END 1 #define OPEN_BOUND 2 #define tRangeBound tInt02
5267b71995-08-09Fredrik Hübinette (Hubbe) /* Prototypes begin here */
6898c02003-11-14Martin Stjernholm void index_no_free(struct svalue *to,struct svalue *what,struct svalue *ind);
9d71082012-09-11Stefan Wallström PMOD_EXPORT void o_index(void);
e7a29a2007-12-28Henrik Grubbström (Grubba) PMOD_EXPORT void o_cast_to_int(void);
e68c782006-07-05Martin Stjernholm PMOD_EXPORT void o_cast_to_string(void);
e7a29a2007-12-28Henrik Grubbström (Grubba) PMOD_EXPORT void o_cast(struct pike_type *type, INT32 run_time_type);
6898c02003-11-14Martin Stjernholm PMOD_EXPORT void f_cast(void);
257fcd2006-08-15Henrik Grubbström (Grubba) void o_check_soft_cast(struct svalue *s, struct pike_type *type);
6898c02003-11-14Martin Stjernholm 
6f0d752000-12-16Marcus Comstedt PMOD_EXPORT void f_ne(INT32 args);
19aaeb1998-05-25Fredrik Hübinette (Hubbe) COMPARISON(f_eq,"`==", is_eq) COMPARISON(f_lt,"`<" , is_lt)
f5971b2004-11-27Martin Stjernholm COMPARISON(f_le,"`<=", is_le)
19aaeb1998-05-25Fredrik Hübinette (Hubbe) COMPARISON(f_gt,"`>" , is_gt)
f5971b2004-11-27Martin Stjernholm COMPARISON(f_ge,"`>=", is_ge)
419fab1997-03-09Fredrik Hübinette (Hubbe) 
97ca7f2005-09-15Henrik Grubbström (Grubba) PMOD_EXPORT INT32 low_rop(struct object *o, int i, INT32 e, INT32 args);
1f21332000-07-28Fredrik Hübinette (Hubbe) PMOD_EXPORT void f_add(INT32 args); PMOD_EXPORT void o_subtract(void); PMOD_EXPORT void f_minus(INT32 args); PMOD_EXPORT void o_and(void); PMOD_EXPORT void f_and(INT32 args); PMOD_EXPORT void o_or(void); PMOD_EXPORT void f_or(INT32 args); PMOD_EXPORT void o_xor(void); PMOD_EXPORT void f_xor(INT32 args); PMOD_EXPORT void o_lsh(void); PMOD_EXPORT void f_lsh(INT32 args); PMOD_EXPORT void o_rsh(void); PMOD_EXPORT void f_rsh(INT32 args); PMOD_EXPORT void o_multiply(void); PMOD_EXPORT void f_multiply(INT32 args);
fbff332016-05-17Per Hedbor PMOD_EXPORT void f_exponent(INT32 args);
1f21332000-07-28Fredrik Hübinette (Hubbe) PMOD_EXPORT void o_divide(void); PMOD_EXPORT void f_divide(INT32 args); PMOD_EXPORT void o_mod(void); PMOD_EXPORT void f_mod(INT32 args); PMOD_EXPORT void o_not(void); PMOD_EXPORT void f_not(INT32 args); PMOD_EXPORT void o_compl(void); PMOD_EXPORT void f_compl(INT32 args); PMOD_EXPORT void o_negate(void);
408a1e2004-10-30Martin Stjernholm PMOD_EXPORT void o_range2(int bound_types); PMOD_EXPORT void f_range (INT32 args);
1f21332000-07-28Fredrik Hübinette (Hubbe) PMOD_EXPORT void f_index(INT32 args); PMOD_EXPORT void f_arrow(INT32 args);
408a1e2004-10-30Martin Stjernholm PMOD_EXPORT void f_index_assign(INT32 args);
47d3ec2002-06-25David Hedbor PMOD_EXPORT void f_arrow_assign(INT32 args);
1f21332000-07-28Fredrik Hübinette (Hubbe) PMOD_EXPORT void f_sizeof(INT32 args);
be478c1997-08-30Henrik Grubbström (Grubba) void init_operators(void);
aa711e1998-06-06Henrik Grubbström (Grubba) void exit_operators(void);
5267b71995-08-09Fredrik Hübinette (Hubbe) /* Prototypes end here */
408a1e2004-10-30Martin Stjernholm /* Compat. */ #define o_range() o_range2 (RANGE_LOW_FROM_BEG|RANGE_HIGH_FROM_BEG)
5267b71995-08-09Fredrik Hübinette (Hubbe) #undef COMPARISON #endif