[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [TEKNIK] Prefix oversigt



Hej Bo,

Jeg sender den her til sslug-programmering (og BCC'er den til dig, da jeg ikke 
ved om du abbonnerer på sslug-programmering). Den hører vist ikke længere til 
på sslug-teknik.  :-)

On Sunday 06 August 2006 13:20, Bo Vagner Højer wrote:
> Herunder er der et lille stykke skole C som gør arbejdet. OK, den er så
> velkommenteret at jeg nok får 03 ;-) Du gemmer koden i en fil med navnet
> prefixfiles.c og oversætter med gcc -o prefixfiles prefixfiles.c
> Derefter fjerner du debuginformationen med strip prefixfiles.
> syntaks er prefixfiles [katalog]

Tak.  :-)

Jeg må jo indrømme at jeg også selv kunne have skrevet koden, jeg håbede bare 
at andre havde gjort det før mig.  :-)

Jeg prøvede at compilere det. Hvilket gav en masse fejl i tråd med disse:

prefixlist.c:41: error: stray ‘\194’ in program
prefixlist.c:41: error: stray ‘\160’ in program
prefixlist.c:41: error: stray ‘\194’ in program
prefixlist.c:41: error: stray ‘\160’ in program

Det viste sig at være et problem med indrykningen efter copy/paste fra KMail. 
Jeg markerede bare det hele og trykkede Ctrl+V i KMail, gik over i gvim og 
trykkede "+gP for at kopiere det ind. Og det gav disse fejl, for hver 
ikke-tom linie. Hvorfor det?

Da jeg havde fjernet alle de fejl, var der denne warning tilbage:
    warning: incompatible implicit declaration of built-in function ‘malloc’
Den refererer til denne linie:
    workspace = (char *)malloc(value);
workspace og value er erklæret sådan:
    char *workspace;
    int value = 0;

Hvorfor advarer den om en omerklæring af malloc? Det er jo bare en typecast af 
det resultat der kommer fra malloc, eller hvad?

-- 

        |\     _,,,---,,_       Greetings, Jens
 ZZZzz /,`.-'`'    -.  ;-;;,_
      |,4-  ) )-,_. ,\ (  `'-'  sslug@sslug
     '---''(_/--'  `-'\_)
----------------------------------------------------
Friends help you move. Real friends help you move bodies.


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2006-09-01, 02:01 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *