Search:

Type: Posts; User: Giorgik63

Search: Search took 0.01 seconds.

  1. I found the solution, to use the Placeholders %d...

    I found the solution, to use the Placeholders %d to get the desired information:


    git log --pretty=format:"Author: %an Date: %as%nVersion: %d%nHistory: %s%n"
  2. Is there any way to view the tag with git log ?

    I need to use the following Git Log command:


    git log --pretty=format:"Author: %an Date: %as%nVersion: %h%nHistory: %s%n" > header.txt

    where I want to display the tag in the Version field....
  3. thanks stahta01

    thanks stahta01
  4. Thanks for the advice, but my request arises from...

    Thanks for the advice, but my request arises from the need to have a history of its evolution and correction for each source .c / .h file. Git gives me the information on the evolution of the whole...
  5. There is the equivalent $Header$, $Date$, $log$ of CVS in Git for C source code ?

    Hello everyone. Can you tell me if the CVS equivalent $Header$, $Date$, $log$ and $Id$, exists in Git for the C source code ?

    Here is this piece of code as an example:


    /* $Header$
    * My Name...
  6. echo " * Author: Giorgio Guglielmone Date: "...

    echo " * Author: Giorgio Guglielmone Date: " `date` >> intestazione.txt
  7. At the moment I wrote this: #!/bin/bash for...

    At the moment I wrote this:


    #!/bin/bash
    for file in *.c; do
    echo "/*" > intestazione.txt
    echo " * File Name: " $file >> intestazione.txt
    echo " *" >> intestazione.txt
    echo "...
  8. Now it is a matter of reading the file name and...

    Now it is a matter of reading the file name and inserting it in the header, then inserting the name of the author and reading the date of creation of the file, always inserting everything in the...
  9. Yes, thank: #!/bin/bash for file in *.c; do...

    Yes, thank:


    #!/bin/bash
    for file in *.c; do
    cat $1 $file > .tmp && mv .tmp $file
    done
  10. Script to add a fixed header to multiple .c/.h files

    I would like to update all the files (.c / .h) of my project, using a script (for Linux), to add a fixed header of the following type:


    /*
    * <File Name>
    * <Author>: <Date>:
    ...
  11. Replies
    2
    Views
    872

    Thank Salem. Correct echo 'const char...

    Thank Salem.
    Correct
    echo 'const char *version = "'$(shell git describe --abbrev=4 --always --tags)'";' > version_info.c
  12. Replies
    2
    Views
    872

    How to view program version number ?

    I wrote a C program for both Linux and Windows.
    I use Git to store versions of the code.
    Is there a way to have the program version displayed when I start it ? Can you tell me how to write these...
  13. I got there now. The solution is very simple: ...

    I got there now. The solution is very simple:


    CPLAT = LINUX

    all: uno

    uno:
    gcc -D $(CPLAT) -c main.c
    gcc -o test main.o
  14. I'll explain. I have the following source code...

    I'll explain. I have the following source code main.c:


    #include <stdio.h>

    int main(int argc, char *argv[]) {
    #ifdef LINUX
    printf("Ciao Linux\n");
    #else
    printf("Ciao Windows\n");
  15. As a compiler I use gcc of MinGW in Windows 10...

    As a compiler I use gcc of MinGW in Windows 10 and gcc in Linux.
    So far, I know too, but I would like to go command line with make, telling which platform to use in the build. Example: make WIN_USE...
  16. I forgot, I use gcc as a compiler, both in...

    I forgot, I use gcc as a compiler, both in Windows and Linux.
  17. How to tell gcc to compile for Windows ?

    I wrote a C program in which valid instructions are used depending on the platform on which the program is to be started: Windows or Linux. In the C code I use #ifdef USE_WIN to say that that piece...
  18. [solved]

    thanks john.c, I found on the Microsoft site that you have to use:

    _setmode(_fileno(stdout), _O_BINARY);
    obviously using between
    #if (_WIN32) and #endif
    in fact it works correctly.
  19. Converting text files from Windows to Linux in C

    Hello everyone. For my C study exercise, I wrote a program under Linux that converts any text file from Unix format to Windows (it involves changing the line terminator from LF to CRLF and vice...
Results 1 to 19 of 19