Created
July 26, 2024 20:59
-
-
Save raphya/d773e9850dd2d9db5fe4b42cf74afa5d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
########################################################## | |
### ctags -x --c-kinds=fp -R ddk > raw.txt | |
### grep -v tmp raw.txt |awk '{print $1}' |sort |uniq > raw2.txt | |
### | |
### diff raw2.txt raw3.txt | |
### 1d0 | |
### < ADAPTER_LOCK_DEFINE | |
### 592,594d590 | |
### < YesNo | |
### < read32_volatile | |
### < write32_volatile | |
### | |
### \rm -fr ePIL ; cpdir sh5_epil ePIL ; cd ePIL ; cp ../sh6_epil/raw* . ; sh /home/raphy/work/vng/auto_proto.sh | |
####################################################### | |
FLIST=" ddk/Kit/EIP201/src/eip201.c ddk/Kit/List/src/list.c ddk/Integration/DriverFramework/src/UMDevXS/hwpal_device_umdevxs.c ddk/Integration/UMDevXS/UserPart/src/umdevxsproxy.c ddk/Integration/Adapter_EIP160/src/adapter_xtsecy.c ddk/Integration/Adapter_EIP160/src/adapter_lock_internal.c ddk/Integration/Adapter_EIP160/src/um/adapter_lock.c ddk/Integration/Adapter_EIP160/src/um/adapter_sleep.c ddk/Integration/Adapter_EIP160/src/um/adapter_interrupts.c ddk/Integration/Adapter_EIP160/src/FPGA/adapter_init.c ddk/Integration/InterruptDispatcher/src/FPGA/intdispatch.c ddk/Integration/WorkerThread/src/workerthread_linuxusermode.c ddk/Kit/EIP160/src/eip160_device.c ddk/Kit/EIP160/src/eip160_secy.c " | |
FLIST="$FLIST `find ddk -name "*.h" |grep -v tmp | tr '\n' ' ' ` " | |
sed -i -e "s/\([0-9a-zA-Z]\)(void)/\1()/" $FLIST | |
sed -i -e "s/const bcm_sec_phy_access_t \*pa,//" $FLIST | |
#### create script | |
perl -ne ' chomp $_; printf (" -e \"s/^%s(/%s(const bcm_sec_phy_access_t *pa,/\" \\\n", $_, $_ ); printf (" -e \"s/^%s(const bcm_sec_phy_access_t [*]pa,)/%s(const bcm_sec_phy_access_t *pa)/\" \\\n", $_, $_ ); printf (" -e \"s/^%s(const bcm_sec_phy_access_t [*]pa,const bcm_sec_phy_access_t [*]pa/%s(const bcm_sec_phy_access_t *pa/\" \\\n", $_, $_ ); printf (" -e \"s/^%s(pa,pa/%s(pa/\" \\\n", $_, $_ ); printf (" -e \"s/%s(/%s(pa,/\" \\\n", $_, $_ ); printf (" -e \"s/%s(pa,)/%s(pa)\/\" \\\n", $_, $_ ); printf (" -e \"s/%s(pa,const/%s(const\/\" \\\n", $_, $_ ) ; printf (" -e \"s/\\(%s.*\\)pa,pa/\\1pa,\/\" \\\n", $_ ) ; printf (" -e \"s/\\(%s.*\\)pa,,/\\1pa,\/\" \\\n", $_ ) ; ' raw3.txt > doit | |
### add head and tail to script | |
echo "sed -i \\" > /tmp/doit | |
cat doit >> /tmp/doit | |
echo "$FLIST" >> /tmp/doit | |
sh /tmp/doit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://pastebin.com/raw/hFMfsG0T