| Guido van Rossum | a7925f1 | 1994-01-26 10:20:16 +0000 | [diff] [blame] | 1 | prog=' | 
 | 2 | s|^\([ 	]*\)\([a-z_]*,\)[ 	]*\(/\*tp_dealloc\*/\)$|\1(destructor)\2 \3| | 
 | 3 | s|^\([ 	]*\)\([a-z_]*,\)[ 	]*\(/\*tp_print\*/\)$|\1(printfunc)\2 \3| | 
 | 4 | s|^\([ 	]*\)\([a-z_]*,\)[ 	]*\(/\*tp_getattr\*/\)$|\1(getattrfunc)\2 \3| | 
 | 5 | s|^\([ 	]*\)\([a-z_]*,\)[ 	]*\(/\*tp_setattr\*/\)$|\1(setattrfunc)\2 \3| | 
 | 6 | s|^\([ 	]*\)\([a-z_]*,\)[ 	]*\(/\*tp_compare\*/\)$|\1(cmpfunc)\2 \3| | 
 | 7 | s|^\([ 	]*\)\([a-z_]*,\)[ 	]*\(/\*tp_repr\*/\)$|\1(reprfunc)\2 \3| | 
 | 8 | s|^\([ 	]*\)\([a-z_]*,\)[ 	]*\(/\*tp_hash\*/\)$|\1(hashfunc)\2 \3| | 
 | 9 |  | 
 | 10 | s|^\([ 	]*\)\([a-z_]*,\)[ 	]*\(/\*sq_length\*/\)$|\1(inquiry)\2 \3| | 
 | 11 | s|^\([ 	]*\)\([a-z_]*,\)[ 	]*\(/\*sq_concat\*/\)$|\1(binaryfunc)\2 \3| | 
 | 12 | s|^\([ 	]*\)\([a-z_]*,\)[ 	]*\(/\*sq_repeat\*/\)$|\1(intargfunc)\2 \3| | 
 | 13 | s|^\([ 	]*\)\([a-z_]*,\)[ 	]*\(/\*sq_item\*/\)$|\1(intargfunc)\2 \3| | 
 | 14 | s|^\([ 	]*\)\([a-z_]*,\)[ 	]*\(/\*sq_slice\*/\)$|\1(intintargfunc)\2 \3| | 
 | 15 | s|^\([ 	]*\)\([a-z_]*,\)[ 	]*\(/\*sq_ass_item\*/\)$|\1(intobjargproc)\2 \3| | 
 | 16 | s|^\([ 	]*\)\([a-z_]*,\)[ 	]*\(/\*sq_ass_slice\*/\)$|\1(intintobjargproc)\2 \3| | 
 | 17 |  | 
 | 18 | s|^\([ 	]*\)\([a-z_]*,\)[ 	]*\(/\*mp_length\*/\)$|\1(inquiry)\2 \3| | 
 | 19 | s|^\([ 	]*\)\([a-z_]*,\)[ 	]*\(/\*mp_subscript\*/\)$|\1(binaryfunc)\2 \3| | 
 | 20 | s|^\([ 	]*\)\([a-z_]*,\)[ 	]*\(/\*mp_ass_subscript\*/\)$|\1(objobjargproc)\2 \3| | 
 | 21 |  | 
 | 22 | s|^\([ 	]*\)\([a-z_]*,\)[ 	]*\(/\*nb_nonzero*\*/\)$|\1(inquiry)\2 \3| | 
 | 23 | s|^\([ 	]*\)\([a-z_]*,\)[ 	]*\(/\*nb_coerce*\*/\)$|\1(coercion)\2 \3| | 
 | 24 | s|^\([ 	]*\)\([a-z_]*,\)[ 	]*\(/\*nb_negative*\*/\)$|\1(unaryfunc)\2 \3| | 
 | 25 | s|^\([ 	]*\)\([a-z_]*,\)[ 	]*\(/\*nb_positive*\*/\)$|\1(unaryfunc)\2 \3| | 
 | 26 | s|^\([ 	]*\)\([a-z_]*,\)[ 	]*\(/\*nb_absolute*\*/\)$|\1(unaryfunc)\2 \3| | 
 | 27 | s|^\([ 	]*\)\([a-z_]*,\)[ 	]*\(/\*nb_invert*\*/\)$|\1(unaryfunc)\2 \3| | 
 | 28 | s|^\([ 	]*\)\([a-z_]*,\)[ 	]*\(/\*nb_int*\*/\)$|\1(unaryfunc)\2 \3| | 
 | 29 | s|^\([ 	]*\)\([a-z_]*,\)[ 	]*\(/\*nb_long*\*/\)$|\1(unaryfunc)\2 \3| | 
 | 30 | s|^\([ 	]*\)\([a-z_]*,\)[ 	]*\(/\*nb_float*\*/\)$|\1(unaryfunc)\2 \3| | 
 | 31 | s|^\([ 	]*\)\([a-z_]*,\)[ 	]*\(/\*nb_oct*\*/\)$|\1(unaryfunc)\2 \3| | 
 | 32 | s|^\([ 	]*\)\([a-z_]*,\)[ 	]*\(/\*nb_hex*\*/\)$|\1(unaryfunc)\2 \3| | 
 | 33 | s|^\([ 	]*\)\([a-z_]*,\)[ 	]*\(/\*nb_[a-z]*\*/\)$|\1(binaryfunc)\2 \3| | 
 | 34 |  | 
 | 35 | ' | 
 | 36 | for file | 
 | 37 | do | 
 | 38 | 	sed -e "$prog" $file >$file.new || break | 
 | 39 | 	if cmp -s $file $file.new | 
 | 40 | 	then | 
 | 41 | 		echo $file unchanged; rm $file.new | 
 | 42 | 	else | 
 | 43 | 		echo $file UPDATED | 
 | 44 | 		mv $file $file~ | 
 | 45 | 		mv $file.new $file | 
 | 46 | 	fi | 
 | 47 | done |