Protocol Buffers - Google's data interchange format (grpc依赖) https://developers.google.com/protocol-buffers/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

8 lines
492 B

shopt -s globstar
sed -i -f rename.sed **/*.c **/*.cc **/*.h **/*.hpp **/*.py
# Since sed can't handle multi-line patterns:
perl -i -pe 'BEGIN{undef $/;} s/\bupb_decode\(([^,\)]+),([^,]+),([^,]+),([^,]+),([^,\)]+)\)/upb_Decode(\1, \2, \3, \4, NULL, 0, \5)/smg' **/*.c **/*.cc **/*.h **/*.hpp
#perl -i -pe 'BEGIN{undef $/;} s/\bupb_Encode\(([^,\)]+),([^,]+),([^,]+),([^,\)]+)\)/upb_Encode(\1, \2, 0, \3, \4)/smg' **/*.c **/*.cc **/*.h **/*.hpp
clang-format -i **/*.c **/*.cc **/*.h **/*.hpp