⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 make_ver.pl

📁 GSM手机设计软件代码
💻 PL
字号:
#----------------------------------------------------------------------------- 
#  Project :  
#  Modul   :  J:\g23m\condat\int\bin\make_ver.pl
#----------------------------------------------------------------------------- 
#  Copyright 2002 Texas Instruments Berlin, AG 
#                 All rights reserved. 
# 
#                 This file is confidential and a trade secret of Texas 
#                 Instruments Berlin, AG 
#                 The receipt of or possession of this file does not convey 
#                 any rights to reproduce or disclose its contents or to 
#                 manufacture, use, or sell anything it may describe, in 
#                 whole, or in part, without the specific written consent of 
#                 Texas Instruments Berlin, AG. 
#----------------------------------------------------------------------------- 
#|  Purpose :  
#----------------------------------------------------------------------------- 
open(CFILE,">ver.c")||die "can't create c file for versionning\n";
my $directory=`cd`;
chomp $directory;
$directory =~ s|.*\\||;
$directory=lc($directory);
if (system("cleartool -ver 2> NUL") == 0)
{
  $view=`cleartool pwv -s`;
  chomp $view;
}
else
{
  $view="non_clearcase";
  chomp $view;
}
$user=$ENV{"USERNAME"};
$view = substr $view, 0, 14;
$user = substr $user, 0, 4;
$time = time;
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($time);
if($year >= 100)
{
  $year -= 100;
}
$time=sprintf ("%02d:%02d:%02d %02d/%02d/%02d",$hour,$min,$sec,$mday,$mon+1,$year);
$version=$user." ".$view."  ".$time;
print CFILE"static char* verstring_$directory = \"$directory $version\" ;\n";
print CFILE"extern char* ${directory}_version(void){\n";
print CFILE"return verstring_$directory ;}";
close CFILE;
my $cc=$ENV{"COMPILER"};
$parms="$cc -me -mt -o -pw2 -x -mw ver.c > nul";
system($parms) == 0
or die "system $parms failed: $?";
unlink "ver.c";

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -