Re: 1/2[OT]: download just the required code of 'escapeshellarg()' function from cvs

From: Andy Hassall (andy_at_andyh.co.uk)
Date: 08/25/04

  • Next message: Andy Hassall: "Re: count number of entries in a directory ?"
    Date: Wed, 25 Aug 2004 20:20:24 +0100
    
    

    On Wed, 25 Aug 2004 21:58:54 +0000, "Maxim Vexler <hq4ever (at) 012 (dot) net
    (dot) il>" <"Maxim Vexler <hq4ever (at) 012 (dot) net (dot) il>"> wrote:

    >Can i somehow download the required code to learn how the
    >escapeshellarg() function works?, i have no intention to compile it, i
    >just want to see the logic behind it & if it uses some more functions
    >from other code files i would like to have them downloaded too.
    >
    >Let me clarify my question : I'm looking for a smart enough (bash ||
    >perl || what ever) script that could log into php's cvs and download the
    >file that holds the C code & its 'h' file for escapeshellarg(), then
    >analyze the code, see if other functions are required by the requested
    >function -- conclude in what file those function are located & download
    >them & their h files as well, this recursively until i will be able to
    >logically follow the execution of the function.

     Sounds quite a lot like you'd need a compiler to do that properly?

    >I know i ask a lot, could be fun to play with, hack who knows if i wont
    >find one maybe I'll develop my own script for that.
    >
    >Any way if what i ask isn't possible could you at least show me how to
    >locate in the cvs repository the file that contains this function & how
    >to download it?

    andyh@server:/usr/src/php-5.0.1$ find . -name '*.c' | xargs grep escapeshellarg
    ./ext/standard/basic_functions.c: PHP_FE(escapeshellarg,NULL)
    ./ext/standard/exec.c:/* {{{ proto string escapeshellarg(string arg)
    ./ext/standard/exec.c:PHP_FUNCTION(escapeshellarg)

    http://cvs.php.net/co.php/php-src/ext/standard/exec.c?r=1.111

     Looks pretty simple.

    -- 
    Andy Hassall / <andy@andyh.co.uk> / <http://www.andyh.co.uk>
    <http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
    

  • Next message: Andy Hassall: "Re: count number of entries in a directory ?"

    Relevant Pages