readme_testctimepst
来自「这里包含了风河vxworks系统中的官方例程的C源代码」· 代码 · 共 58 行
TXT
58 行
FILE LIST - testCtimePST.cDESCRIPTION - ctime: This routine converts the calendar time pointed to by timer into local time in the from of a string. It is equivalent to: asctime (localtime (timer)); Returns the pointer returned by asctime() with local broken -down time as the argument. strcmp: The routine compares up to n characters of string s2 lexicographically. Returns an integer greater than, equal to, or less than 0, according to whether s1 is lexicographically greater than, equal to, or less than s2, respectively. malloc: This routine allocates a blcok of memory from the free list. The size of the block will be equal to or greater than nBytes. RETURNS a pointer to the allocated block of memory, or a null pointer if there is an error.RUNNING DEMO - Place the testCtimePST.c file in your <Tornado> dir. Depending on the target you have, define the CPU in your compile line and use the Makefile in the BSP dir. to compile. To run this code invoke the function testCtimePST().TESTED ON - Host/Target : Solaris 2.5.1 / mv1604 VxWorks : 5.3.1EXAMPLE COMPILE LINE - make CPU=PPC604 testCtimePST.o% make testCtimePST.occppc -B/petaluma1/mayur/tor101-ppc/host/sun4-solaris2/lib/gcc-lib/ -mstrict-align -ansi -nostdinc -O2 -fvolatile -fno-builtin -fno-for-scope -Wall -I/h -I. -I/petaluma1/mayur/tor101-ppc/target/config/all -I/petaluma1/mayur/tor101-ppc/target/h -I/petaluma1/mayur/tor101-ppc/target/src/config -I/petaluma1/mayur/tor101-ppc/target/src/drv -DCPU=PPC604 -DMV1600 -DTARGET_DIR="\"mv1604\"" -c testCtimePST.cOUTPUTS/LOGFILE -On VxWorks target:==================-> ld <testCtimePST.ovalue = 911784 = 0xde9a8-> testCtimePST()value = 0 = 0x0The Output on Console:======================SUCCESS testing ctimePST
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?