Search:

Type: Posts; User: ordak

Page 1 of 5 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    6
    Views
    499

    On this laptop without optimization flags for...

    On this laptop without optimization flags for compiler , for last code I get total 47.25 sec comparing to total 50.52 sec for original quicksort ​in post #1.
  2. Replies
    6
    Views
    499

    I borrowed some code from quadsort...

    I borrowed some code from quadsort. Now here is a new version of custom quicksort:



    #include <stdio.h>
    #include <stdlib.h>
    #include <time.h>
    #include <stdbool.h>
    #include <stdint.h>
  3. Replies
    6
    Views
    499

    Here is my current effort: #define MIN_LEN...

    Here is my current effort:



    #define MIN_LEN 10


    void quicksort2(int *A, int len)
    {
    if (len < 2) return;
  4. Replies
    6
    Views
    499

    I already tested. Results are close and I am...

    I already tested. Results are close and I am afraid of slightly different
    results on each run. I am on a laptop also.



    I did a variety of tests here is one result from a shuffled array...
  5. Replies
    6
    Views
    499

    Custom quick sort

    Hi,

    I found a quick sort implementation in this link mentioned below. I modified it into a custom version.



    #include <stdbool.h>
    #include <stdint.h>
    #include <stdio.h>
    #include...
  6. Thread: Indent command

    by ordak
    Replies
    15
    Views
    807

    There is also another LLVM Clang utility:...

    There is also another LLVM Clang utility: clang-format



    clang-format -style=Microsoft -i try6.c




    #include <stdio.h>
  7. Thread: Indent command

    by ordak
    Replies
    15
    Views
    807

    Let's start with a simple program: $ indent...

    Let's start with a simple program:

    $ indent try6.c


    #include <stdio.h>


    // Comment 1
    int
  8. Thread: Indent command

    by ordak
    Replies
    15
    Views
    807

    I accept pointing out mistakes in codes. Thanks.

    I accept pointing out mistakes in codes. Thanks.
  9. Thread: Indent command

    by ordak
    Replies
    15
    Views
    807

    I just indented the first and second code with...

    I just indented the first and second code with the given command. Let's see code as it is on link provided:



    #include <stdio.h>
    #include <ctype.h>
    #include <string.h>


    char...
  10. Thread: Indent command

    by ordak
    Replies
    15
    Views
    807

    This topic is about code indenting. the supplied...

    This topic is about code indenting. the supplied code was just an example for that. Indent is a Linux command. First let me try another code from the same page:



    #include <stdio.h>
    #include...
  11. Thread: Indent command

    by ordak
    Replies
    15
    Views
    807

    Indent command

    Hi,

    I am trying a custom indent command for C source codes. I used that on a solution for k&r problem. Do you like this indent ? Any flaws to be fixed ?



    $ indent -as -nut -ts4 -bli0 -i4...
  12. Thread: Detailed asserts

    by ordak
    Replies
    1
    Views
    421

    Detailed asserts

    Greetings,

    Until now both clang/gcc compilers do not show detailed/verbose info for asserts. Consider:



    // detailed asserts


    #include <stdio.h>
  13. Replies
    2
    Views
    1,045

    I have no idea on how to produce a simple code...

    I have no idea on how to produce a simple code based on the original one. I may ask the question on a place , where some may know the project's internals. Thanks anyway.
  14. Replies
    2
    Views
    1,045

    Function call problem (segmentation fault)

    Hello,

    Considering this project:

    I try to call a function in benchmark.c file. The existing calls work well in search.c file. But my newer call causes segmentation fault. I suspect there can be...
  15. Replies
    2
    Views
    1,814

    I made some changes to your code: #include...

    I made some changes to your code:



    #include <stdio.h>
    #include <stdlib.h>

    int main (void)
    {
    int it = 0;
  16. Replies
    5
    Views
    2,157

    For GTK take a look at : here...

    For GTK take a look at :

    here.
  17. Replies
    1
    Views
    1,115

    Glib is OK , I have a little experience with...

    Glib is OK , I have a little experience with CUnit too.
  18. Replies
    0
    Views
    1,048

    GTK signal question

    Hi,

    I seem to have a similar problem to this case:
    c - char* in a gpointer sends a string in a strange encoding - Stack Overflow

    I made recent_title a global variable as explained in the link....
  19. I still use Code::Blocks IDE with a custom...

    I still use Code::Blocks IDE with a custom make-file.



    -------------- Build: all in xboard_fork (compiler: LLVM Clang Compiler 10 GTK Library Warnings_Disabled)---------------

    Checking if...
  20. By the way I am using a make-file rather than an...

    By the way I am using a make-file rather than an IDE (Code::Blocks) project. In case it matters.
  21. Although not much recommended it exist , visit...

    Although not much recommended it exist , visit here.



    I still get some warnings that show #pragma does not work correctly yet:



    #pragma clang diagnostic push
    #pragma clang diagnostic...
  22. Enabling -Weverything for a part of code in Clang

    Hi,

    I want to enable -Weverything for a piece of C code using LLVM Clang compiler.
    Why the following does not work for me , what should I do ?


    #pragma clang diagnostic push
    #pragma clang...
  23. Thread: GTK noob

    by ordak
    Replies
    1
    Views
    1,880

    GTK noob

    Hi,

    I am trying to add "recent files" feature to a GTK project. I get the file name correctly but afterwards things do not go on as expected. It the following code , I am working to get first file...
  24. Replies
    13
    Views
    3,091

    Code::Blocks forum address is: Code::Blocks -...

    Code::Blocks forum address is:

    Code::Blocks - Index
  25. Replies
    46
    Views
    13,001

    Can not you use ungetc like here...

    Can not you use ungetc like here ?
Results 1 to 25 of 115
Page 1 of 5 1 2 3 4