源码地带 > 电路图 > 电子资料下载 > ARM >AVR_usb_ISP > 查看压缩包源码

AVR_usb_ISP

源代码在线查看: compare-sizes.awk

软件大小: 419 K
上传用户: liyuanhang
关键词: AVR_usb_ISP
下载地址: 免注册下载 普通下载 VIP

相关代码

				#!/usr/bin/awk -f				# Name: compare-sizes.awk				# Project: avr-usb				# Author: Christian Starkjohann				# Creation Date: 2008-04-29				# Tabsize: 4				# Copyright: (c) 2008 by OBJECTIVE DEVELOPMENT Software GmbH				# License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt)				# This Revision: $Id$								BEGIN{					opt = 0;					if(ARGC != 3){						printf("usage: compare-sizes.awk file1 file2\n");						printf("  computes size differences between two size lists\n");						exit 1;					}					file1 = ARGV[1];					file2 = ARGV[2];				}								{					if(($2 + 0) != 0){						if(!hadOption[$1]){							hadOption[$1] = 1;							options[opt++] = $1;						}						flash[FILENAME, $1] = $2;						ram[FILENAME, $1] = $3;					}				}								END{					if(opt > 0){						printf ("%39s %6s %5s\n", "Variation", "+Flash", "+RAM");					}					for(i = 0; i < opt; i++){						option = options[i];				        if(!flash[file2, option] || !flash[file1, option]){				            printf("%39s %6s %5s\n", option, "n/a", "n/a");				        }else{				            printf("%39s %+6d %+5d\n", option, flash[file2, option] - flash[file1, option], ram[file2, option] - ram[file1, option]);				        }					}				}							

相关资源